[Zope3-checkins] CVS: Zope3/src/zope/app/publisher/browser/tests - test_directives.py:1.27 test_globalbrowsermenuservice.py:1.15 test_globalbrowsermenuservicedirectives.py:1.11

Godefroid Chapelle cvs-admin at zope.org
Sun Dec 7 05:05:24 EST 2003


Update of /cvs-repository/Zope3/src/zope/app/publisher/browser/tests
In directory cvs.zope.org:/tmp/cvs-serv5496/app/publisher/browser/tests

Modified Files:
	test_directives.py test_globalbrowsermenuservice.py 
	test_globalbrowsermenuservicedirectives.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/publisher/browser/tests/test_directives.py 1.26 => 1.27 ===
--- Zope3/src/zope/app/publisher/browser/tests/test_directives.py:1.26	Thu Nov 27 08:59:23 2003
+++ Zope3/src/zope/app/publisher/browser/tests/test_directives.py	Sun Dec  7 05:04:53 2003
@@ -44,6 +44,7 @@
 from zope.app.interfaces.security import IPermissionService
 
 from zope.publisher.interfaces.browser import IBrowserPublisher
+from zope.app import zapi
 
 tests_path = os.path.join(
     os.path.split(zope.app.publisher.browser.__file__)[0],
@@ -94,6 +95,7 @@
 
     def setUp(self):
         super(Test, self).setUp()
+        
         XMLConfig('meta.zcml', zope.app.publisher.browser)()
 
         from zope.app.tests import ztapi
@@ -101,6 +103,10 @@
         from zope.app.interfaces.traversing import ITraversable
 
         ztapi.provideAdapter(None, ITraversable, DefaultTraversable)
+
+        ps =  zapi.getService(None, zapi.servicenames.Presentation)
+        ps.defineUsage("objectview")
+        ps.defineUsage("overridden")
 
     def testPage(self):
         self.assertEqual(queryView(ob, 'test', request),


=== Zope3/src/zope/app/publisher/browser/tests/test_globalbrowsermenuservice.py 1.14 => 1.15 ===
--- Zope3/src/zope/app/publisher/browser/tests/test_globalbrowsermenuservice.py:1.14	Wed Dec  3 00:41:34 2003
+++ Zope3/src/zope/app/publisher/browser/tests/test_globalbrowsermenuservice.py	Sun Dec  7 05:04:53 2003
@@ -28,6 +28,7 @@
 from zope.publisher.browser import TestRequest
 from zope.publisher.interfaces.browser import IBrowserPublisher
 from zope.security.management import newSecurityManager, system_user
+from zope.app import zapi
 
 class I1(Interface): pass
 class I11(I1): pass
@@ -199,6 +200,8 @@
         self.assertEqual(list(menu), [])
 
     def testUsage(self):
+        ps = zapi.getService(None, zapi.servicenames.Presentation)
+        ps.defineUsage(u'objectview')
         r = self.__reg()
         r.menu('test_id', 'test menu', usage=u'objectview')
         self.assertEqual(r.getMenuUsage('test_id'), u'objectview')


=== Zope3/src/zope/app/publisher/browser/tests/test_globalbrowsermenuservicedirectives.py 1.10 => 1.11 ===
--- Zope3/src/zope/app/publisher/browser/tests/test_globalbrowsermenuservicedirectives.py:1.10	Wed Dec  3 00:41:34 2003
+++ Zope3/src/zope/app/publisher/browser/tests/test_globalbrowsermenuservicedirectives.py	Sun Dec  7 05:04:53 2003
@@ -110,6 +110,7 @@
 
         xmlconfig(StringIO(template % (
             """
+            <browser:usage name="objectview" />
             <browser:menu id="test_id" title="test menu" usage="objectview" />
 
             <browser:menu id="test_id2" title="test menu" />




More information about the Zope3-Checkins mailing list