[Zope3-checkins] CVS: Zope3/src/zope/app/pagetemplate/tests -
test_binding.py:1.8 test_directives.py:1.7
Jim Fulton
cvs-admin at zope.org
Fri Nov 21 12:12:40 EST 2003
Update of /cvs-repository/Zope3/src/zope/app/pagetemplate/tests
In directory cvs.zope.org:/tmp/cvs-serv31883/src/zope/app/pagetemplate/tests
Modified Files:
test_binding.py test_directives.py
Log Message:
Changed to use the new ztapi module, which provides handy functions
for setting up adapters and views for tests. This is needed because
there are no-longer global adapter and view services sitting around as
module globals.
=== Zope3/src/zope/app/pagetemplate/tests/test_binding.py 1.7 => 1.8 ===
--- Zope3/src/zope/app/pagetemplate/tests/test_binding.py:1.7 Thu Aug 21 10:19:28 2003
+++ Zope3/src/zope/app/pagetemplate/tests/test_binding.py Fri Nov 21 12:12:09 2003
@@ -25,15 +25,15 @@
from zope.app.traversing.adapters import Traverser, DefaultTraversable
from zope.app.interfaces.traversing import ITraverser
from zope.app.interfaces.traversing import ITraversable
-from zope.component.adapter import provideAdapter
+from zope.app.tests import ztapi
class BindingTestCase(PlacelessSetup, unittest.TestCase):
def setUp(self):
PlacelessSetup.setUp(self)
- provideAdapter(None, ITraverser, Traverser)
- provideAdapter(None, ITraversable, DefaultTraversable)
+ ztapi.provideAdapter(None, ITraverser, Traverser)
+ ztapi.provideAdapter(None, ITraversable, DefaultTraversable)
def test_binding(self):
comp = PTComponent(Content())
=== Zope3/src/zope/app/pagetemplate/tests/test_directives.py 1.6 => 1.7 ===
--- Zope3/src/zope/app/pagetemplate/tests/test_directives.py:1.6 Fri Aug 22 16:02:19 2003
+++ Zope3/src/zope/app/pagetemplate/tests/test_directives.py Fri Nov 21 12:12:09 2003
@@ -21,7 +21,7 @@
from zope.configuration.xmlconfig import xmlconfig, XMLConfig
from zope.interface import Interface, implements
-from zope.component.adapter import provideAdapter
+from zope.app.tests import ztapi
import zope.app.pagetemplate
@@ -65,7 +65,7 @@
def testTalesAPI1(self):
from zope.app.pagetemplate.engine import Engine
- provideAdapter(None, I, Adapter)
+ ztapi.provideAdapter(None, I, Adapter)
xmlconfig(StringIO(template % (
"""
More information about the Zope3-Checkins
mailing list