[Zope-Checkins]
SVN: Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testZopePageTemplate.py
A recent fix in the zope 3 traversing code now requires the
ITraversable
Philipp von Weitershausen
philikon at philikon.de
Sun May 28 20:49:53 EDT 2006
Log message for revision 68328:
A recent fix in the zope 3 traversing code now requires the ITraversable
adapter to be present even when traversing just dicts. No problem, we can
set it up quite easily.
This basically finishes this branch. All tests pass, some 3rd party apps
have been tested with it. There are a few test failures in the CMF and
others (e.g. Plone), but that's mostly "their fault" (incorrect or
unexpected usage of certain things).
Changed:
U Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testZopePageTemplate.py
-=-
Modified: Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testZopePageTemplate.py
===================================================================
--- Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testZopePageTemplate.py 2006-05-29 00:31:57 UTC (rev 68327)
+++ Zope/branches/ajung-zpt-end-game/lib/python/Products/PageTemplates/tests/testZopePageTemplate.py 2006-05-29 00:49:52 UTC (rev 68328)
@@ -10,7 +10,8 @@
import unittest
import Zope2
import transaction
-
+import zope.component.testing
+from zope.traversing.adapters import DefaultTraversable
from Testing.makerequest import makerequest
class ZPTRegressions(unittest.TestCase):
@@ -57,9 +58,12 @@
pt = self.app.pt1
self.assertEqual(pt.document_src(), self.text)
-class ZPTMacros(unittest.TestCase):
+class ZPTMacros(zope.component.testing.PlacelessSetup, unittest.TestCase):
def setUp(self):
+ super(ZPTMacros, self).setUp()
+ zope.component.provideAdapter(DefaultTraversable, (None,))
+
transaction.begin()
self.app = makerequest(Zope2.app())
f = self.app.manage_addProduct['PageTemplates'].manage_addPageTemplate
@@ -89,6 +93,8 @@
"""
def tearDown(self):
+ super(ZPTMacros, self).tearDown()
+
transaction.abort()
self.app._p_jar.close()
More information about the Zope-Checkins
mailing list