[prev in list] [next in list] [prev in thread] [next in thread]
List: zope3-checkins
Subject: [Zope3-checkins] SVN: Zope3/trunk/ For ``for`` parameter of the
From: Philipp von Weitershausen <philikon () philikon ! de>
Date: 2005-04-07 14:26:38
Message-ID: 20050407142638.620E22032E2 () mail ! zope ! org
[Download RAW message or body]
Log message for revision 29897:
For ``for`` parameter of the <browser:menuItem> and
<browser:menuItems> directives was not marked as required in
the directive schema, while it actually was expected to be
required.
Changed:
U Zope3/trunk/doc/CHANGES.txt
U Zope3/trunk/src/zope/app/publisher/browser/metadirectives.py
U Zope3/trunk/src/zope/app/publisher/browser/tests/test_directives.py
-=-
Modified: Zope3/trunk/doc/CHANGES.txt
===================================================================
--- Zope3/trunk/doc/CHANGES.txt 2005-04-07 04:48:06 UTC (rev 29896)
+++ Zope3/trunk/doc/CHANGES.txt 2005-04-07 14:26:38 UTC (rev 29897)
@@ -692,6 +692,11 @@
(``IUserPreferredLanguages``), instead of hard-wiring the
default one.
+ - For ``for`` parameter of the <browser:menuItem> and
+ <browser:menuItems> directives was not marked as required in
+ the directive schema, while it actually was expected to be
+ required.
+
Much thanks to everyone who contributed to this release:
Jim Fulton, Fred Drake, Philipp von Weitershausen, Stephan Richter,
Modified: Zope3/trunk/src/zope/app/publisher/browser/metadirectives.py
===================================================================
--- Zope3/trunk/src/zope/app/publisher/browser/metadirectives.py 2005-04-07 04:48:06 \
UTC (rev 29896)
+++ Zope3/trunk/src/zope/app/publisher/browser/metadirectives.py 2005-04-07 14:26:38 \
UTC (rev 29897) @@ -415,7 +415,7 @@
for_ = GlobalInterface(
title=u"Interface",
description=u"The interface the menu items are defined for",
- required=False
+ required=True
)
layer = LayerField(
Modified: Zope3/trunk/src/zope/app/publisher/browser/tests/test_directives.py
===================================================================
--- Zope3/trunk/src/zope/app/publisher/browser/tests/test_directives.py 2005-04-07 \
04:48:06 UTC (rev 29896)
+++ Zope3/trunk/src/zope/app/publisher/browser/tests/test_directives.py 2005-04-07 \
14:26:38 UTC (rev 29897) @@ -1157,6 +1157,33 @@
self.assert_(isinstance(v, V1))
+ def testMenuItemNeedsFor(self):
+ # <browser:menuItem> directive fails if no 'for' argument was provided
+ from zope.configuration.exceptions import ConfigurationError
+ self.assertRaises(ConfigurationError, xmlconfig, StringIO(template %
+ '''
+ <browser:menu
+ id="test_menu" title="Test menu" />
+ <browser:menuItem
+ title="Test Entry"
+ menu="test_menu"
+ action="@@test"
+ />
+ '''
+ ))
+
+ # it works, when the argument is there and a valid interface
+ xmlconfig(StringIO(template %
+ '''
+ <browser:menuItem
+ for="zope.app.component.tests.views.IC"
+ title="Test Entry"
+ menu="test_menu"
+ action="@@test"
+ />
+ '''
+ ))
+
def test_suite():
return unittest.TestSuite((
unittest.makeSuite(Test),
_______________________________________________
Zope3-Checkins mailing list
Zope3-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope3-checkins
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic