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
524e4e75
Commit
524e4e75
authored
Mar 23, 2010
by
David Glick
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merge r110118-110121 from 2.12 branch
parent
6205dfa9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
src/Products/Five/browser/metaconfigure.py
src/Products/Five/browser/metaconfigure.py
+3
-1
src/Products/Five/browser/tests/test_metaconfigure.py
src/Products/Five/browser/tests/test_metaconfigure.py
+7
-1
No files found.
src/Products/Five/browser/metaconfigure.py
View file @
524e4e75
...
...
@@ -231,7 +231,7 @@ class view(zope.browserpage.metaconfigure.view):
if
view
is
not
None
:
return
view
raise
NotFound
Error
(
self
,
name
,
request
)
raise
NotFound
(
self
,
name
,
request
)
cdict
[
'publishTraverse'
]
=
publishTraverse
...
...
@@ -422,6 +422,8 @@ class ViewMixinForTemplates(BrowserView):
raise
NotFound
(
self
,
name
,
request
)
def
__getitem__
(
self
,
name
):
if
name
==
'macros'
:
return
self
.
index
.
macros
return
self
.
index
.
macros
[
name
]
def
__call__
(
self
,
*
args
,
**
kw
):
...
...
src/Products/Five/browser/tests/test_metaconfigure.py
View file @
524e4e75
...
...
@@ -42,6 +42,12 @@ class ViewMixinForTemplatesTests(unittest.TestCase):
index
.
macros
[
'aaa'
]
=
aaa
=
object
()
self
.
failUnless
(
view
[
'aaa'
]
is
aaa
)
def
test__getitem__gives_shortcut_to_index_macros
(
self
):
view
=
self
.
_makeOne
()
view
.
index
=
index
=
DummyTemplate
()
index
.
macros
=
{}
self
.
failUnless
(
view
[
'macros'
]
is
index
.
macros
)
def
test___call___no_args_no_kw
(
self
):
view
=
self
.
_makeOne
()
view
.
index
=
index
=
DummyTemplate
()
...
...
@@ -63,7 +69,7 @@ class ViewMixinForTemplatesTests(unittest.TestCase):
self
.
failUnless
(
result
is
index
)
self
.
assertEqual
(
index
.
_called_with
,
((),
{
'foo'
:
'bar'
}))
def
test___call___
no_args_no
_kw
(
self
):
def
test___call___
w_args_w
_kw
(
self
):
view
=
self
.
_makeOne
()
view
.
index
=
index
=
DummyTemplate
()
result
=
view
(
'abc'
,
foo
=
'bar'
)
...
...
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