[Zope3-checkins] CVS: Zope3/src/zope/app/services/tests - test_menu.py:1.4.2.1

Christian Zagrodnick cvs-admin at zope.org
Sat Dec 6 13:29:52 EST 2003


Update of /cvs-repository/Zope3/src/zope/app/services/tests
In directory cvs.zope.org:/tmp/cvs-serv16289/src/zope/app/services/tests

Modified Files:
      Tag: gotcha-usage-branch
	test_menu.py 
Log Message:
finished the support of 'usage' in page templates (or better views)
 - repaired editForm
 - added to addForm
 - added <usage name=.. /> zcml directive
 - directives that rely on usage check for existing usages
 - asserting that a usage can only be defined once
 - tried use of usage in container/add.pt



=== Zope3/src/zope/app/services/tests/test_menu.py 1.4 => 1.4.2.1 ===
--- Zope3/src/zope/app/services/tests/test_menu.py:1.4	Wed Dec  3 00:41:35 2003
+++ Zope3/src/zope/app/services/tests/test_menu.py	Sat Dec  6 13:29:22 2003
@@ -71,7 +71,7 @@
     registration = UtilityRegistration(menu_id, ILocalBrowserMenu, path)
     key = default.getRegistrationManager().addRegistration(registration)
     zapi.traverse(default.getRegistrationManager(), key).status = ActiveStatus
-    return zapi.traverse(default, menu_id)    
+    return zapi.traverse(default, menu_id)
 
 
 def addMenuItem(menu, interface, action, title):
@@ -98,6 +98,10 @@
         classImplements(LocalBrowserMenu, IAttributeAnnotatable)
         
         # Create Placeless Components
+        ps = zapi.getService(None, zapi.servicenames.Presentation)
+        ps.defineUsage('usage')
+        ps.defineUsage('usage 2')
+        ps.defineUsage('usage 3')
         ms = zapi.getService(None, BrowserMenu)
         ms.menu('test_id', 'test menu', usage='usage')
         ms.menu('test_id2', 'test menu 2', usage='usage 2')




More information about the Zope3-Checkins mailing list