[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/publisher/browser/tests/test_addMenuItem.py Fix tests

Julien Anguenot ja at nuxeo.com
Fri Jul 29 19:10:27 EDT 2005


Log message for revision 37581:
  Fix tests

Changed:
  U   Zope3/trunk/src/zope/app/publisher/browser/tests/test_addMenuItem.py

-=-
Modified: Zope3/trunk/src/zope/app/publisher/browser/tests/test_addMenuItem.py
===================================================================
--- Zope3/trunk/src/zope/app/publisher/browser/tests/test_addMenuItem.py	2005-07-29 23:09:14 UTC (rev 37580)
+++ Zope3/trunk/src/zope/app/publisher/browser/tests/test_addMenuItem.py	2005-07-29 23:10:27 UTC (rev 37581)
@@ -84,8 +84,8 @@
 class Context(object):
     actions = ()
     info = ''
-    
-    def action(self, discriminator, callable, args):
+
+    def action(self, discriminator, callable, args, order=0):
         self.actions += ((discriminator, callable, args), )
 
     def __repr__(self):
@@ -137,7 +137,12 @@
     ...             permission="zope.ManageContent", description="blah blah",
     ...             filter="context/foo", view="AddX")
     >>> context
-    ((('adapter',
+    ((None,
+      <function _checkViewFor>,
+      (<InterfaceClass zope.app.container.interfaces.IAdding>,
+       <InterfaceClass zope.publisher.interfaces.browser.IDefaultBrowserLayer>,
+       'AddX')),
+     (('adapter',
        (<InterfaceClass zope.app.container.interfaces.IAdding>,
         <InterfaceClass zope.publisher.interfaces.browser.IDefaultBrowserLayer>),
        <InterfaceClass zope.app.publisher.interfaces.browser.AddMenu>,
@@ -184,6 +189,11 @@
       <function provideInterface>,
       ('zope.component.interfaces.IFactory',
        <InterfaceClass zope.component.interfaces.IFactory>)),
+     (None,
+      <function _checkViewFor>,
+      (<InterfaceClass zope.app.container.interfaces.IAdding>,
+       <InterfaceClass zope.publisher.interfaces.browser.IDefaultBrowserLayer>,
+       'AddX')),
      (('adapter',
        (<InterfaceClass zope.app.container.interfaces.IAdding>,
         <InterfaceClass zope.publisher.interfaces.browser.IDefaultBrowserLayer>),
@@ -326,7 +336,7 @@
     >>> context = Context()
     >>> addMenuItem(context, factory="x.y.z", title="Add an X",
     ...             permission="zope.ManageContent", description="blah blah",
-    ...             filter="context/foo", icon=u'/@@/icon.png', extra='Extra', 
+    ...             filter="context/foo", icon=u'/@@/icon.png', extra='Extra',
     ...             order=99)
     >>> context
     ((('adapter',



More information about the Zope3-Checkins mailing list