Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
1853b0f6
Commit
1853b0f6
authored
Jul 30, 2007
by
Philipp von Weitershausen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Assert that views of the form
class MyView(BrowserView): __call__ = ViewPageTemplateFile('...') work.
parent
0e27cc13
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
0 deletions
+20
-0
lib/python/Products/Five/browser/tests/pages.py
lib/python/Products/Five/browser/tests/pages.py
+5
-0
lib/python/Products/Five/browser/tests/pages.zcml
lib/python/Products/Five/browser/tests/pages.zcml
+7
-0
lib/python/Products/Five/browser/tests/pages_ftest.txt
lib/python/Products/Five/browser/tests/pages_ftest.txt
+8
-0
No files found.
lib/python/Products/Five/browser/tests/pages.py
View file @
1853b0f6
...
...
@@ -16,6 +16,7 @@
$Id$
"""
from
Products.Five
import
BrowserView
from
Products.Five.browser.pagetemplatefile
import
ViewPageTemplateFile
class
SimpleView
(
BrowserView
):
"""More docstring. Please Zope"""
...
...
@@ -39,6 +40,10 @@ class CallView(BrowserView):
def
__call__
(
self
):
return
u"I was __call__()'ed"
class
CallTemplate
(
BrowserView
):
__call__
=
ViewPageTemplateFile
(
'falcon.pt'
)
class
CallableNoDocstring
:
def
__call__
(
self
):
...
...
lib/python/Products/Five/browser/tests/pages.zcml
View file @
1853b0f6
...
...
@@ -161,6 +161,13 @@
permission="zope2.Public"
/>
<browser:page
for="Products.Five.tests.testing.simplecontent.ISimpleContent"
class=".pages.CallTemplate"
name="calltemplate.html"
permission="zope2.Public"
/>
<!-- pages from methods/functions/callables that don't have docstrings -->
<browser:pages
for="Products.Five.tests.testing.simplecontent.ISimpleContent"
...
...
lib/python/Products/Five/browser/tests/pages_ftest.txt
View file @
1853b0f6
...
...
@@ -144,6 +144,14 @@ class bearing only a __call__ method:
...
I was __call__()'ed
or a __call__ object that's callable, such as a ViewPageTemplateFile:
>>> print http(r'''
... GET /test_folder_1_/testoid/calltemplate.html HTTP/1.1
... ''')
HTTP/1.1 200 OK
...
<p>The falcon has taken flight</p>
Clean up
--------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment