[Zope3-checkins]
SVN: Zope3/branches/ctheune-issue-574/src/zope/app/pagetemplate/tests/test_engine.py
removed usage of ztapi from my patch
Christian Theune
ct at gocept.com
Mon Aug 14 18:58:52 EDT 2006
Log message for revision 69496:
removed usage of ztapi from my patch
Changed:
U Zope3/branches/ctheune-issue-574/src/zope/app/pagetemplate/tests/test_engine.py
-=-
Modified: Zope3/branches/ctheune-issue-574/src/zope/app/pagetemplate/tests/test_engine.py
===================================================================
--- Zope3/branches/ctheune-issue-574/src/zope/app/pagetemplate/tests/test_engine.py 2006-08-14 21:42:43 UTC (rev 69495)
+++ Zope3/branches/ctheune-issue-574/src/zope/app/pagetemplate/tests/test_engine.py 2006-08-14 22:58:51 UTC (rev 69496)
@@ -18,7 +18,7 @@
import unittest
from zope.testing.doctestunit import DocTestSuite
-from zope.app.testing import ztapi
+import zope.component
from zope.app.pagetemplate.engine import _Engine
from zope.proxy import isProxy
from zope.traversing.interfaces import IPathAdapter
@@ -30,10 +30,16 @@
class EngineTests(unittest.TestCase):
+ def setUp(self):
+ gsm = zope.component.getGlobalSiteManager()
+ gsm.registerAdapter(DummyNamespace, required=(), provided=IPathAdapter, name='test')
+ def tearDown(self):
+ gsm = zope.component.getGlobalSiteManager()
+ gsm.unregisterAdapter(DummyNamespace, required=(), provided=IPathAdapter, name='test')
+
def test_issue574(self):
engine = _Engine()
- ztapi.provideAdapter(None, IPathAdapter, DummyNamespace, 'test')
namespace = engine.getFunctionNamespace('test')
self.failUnless(isProxy(namespace))
More information about the Zope3-Checkins
mailing list