[Zope3-checkins] CVS: Zope3/src/zope/app/services/tests -
test_menu.py:1.5
Godefroid Chapelle
cvs-admin at zope.org
Sun Dec 7 05:05:25 EST 2003
Update of /cvs-repository/Zope3/src/zope/app/services/tests
In directory cvs.zope.org:/tmp/cvs-serv5496/app/services/tests
Modified Files:
test_menu.py
Log Message:
merge gotcha-usage-branch
this finishes support for usage :
top-level variable in page templates
initialized from ZCML
main goal is to use a unique template per skin
now, I should walk all templates that relies on dialog_macros.pt
and convert them to template.pt
=== Zope3/src/zope/app/services/tests/test_menu.py 1.4 => 1.5 ===
--- 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 Sun Dec 7 05:04:54 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