[Zope3-checkins] CVS: Zope3/src/zope/app/publisher/browser/tests -
test_directives.py:1.26.2.1
test_globalbrowsermenuservicedirectives.py:1.10.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/publisher/browser/tests
In directory cvs.zope.org:/tmp/cvs-serv16289/src/zope/app/publisher/browser/tests
Modified Files:
Tag: gotcha-usage-branch
test_directives.py test_globalbrowsermenuservicedirectives.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/publisher/browser/tests/test_directives.py 1.26 => 1.26.2.1 ===
--- 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 Sat Dec 6 13:29:21 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_globalbrowsermenuservicedirectives.py 1.10 => 1.10.2.1 ===
--- 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 Sat Dec 6 13:29:21 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