[Zope3-checkins] CVS: Zope3/src/zope/app/container/tests - placelesssetup.py:1.4 test_objectcopier.py:1.11 test_objectmover.py:1.8

Jim Fulton cvs-admin at zope.org
Fri Nov 21 12:12:31 EST 2003


Update of /cvs-repository/Zope3/src/zope/app/container/tests
In directory cvs.zope.org:/tmp/cvs-serv31883/src/zope/app/container/tests

Modified Files:
	placelesssetup.py test_objectcopier.py test_objectmover.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/container/tests/placelesssetup.py 1.3 => 1.4 ===
--- Zope3/src/zope/app/container/tests/placelesssetup.py:1.3	Sun Sep 21 13:31:39 2003
+++ Zope3/src/zope/app/container/tests/placelesssetup.py	Fri Nov 21 12:12:00 2003
@@ -15,7 +15,7 @@
 
 $Id$
 """
-from zope.component.adapter import provideAdapter
+from zope.app.tests import ztapi
 from zope.app.interfaces.container import IWriteContainer
 from zope.app.interfaces.container import INameChooser
 from zope.app.container.contained import NameChooser
@@ -23,4 +23,4 @@
 class PlacelessSetup:
 
     def setUp(self):
-        provideAdapter(IWriteContainer, INameChooser, NameChooser)
+        ztapi.provideAdapter(IWriteContainer, INameChooser, NameChooser)


=== Zope3/src/zope/app/container/tests/test_objectcopier.py 1.10 => 1.11 ===
--- Zope3/src/zope/app/container/tests/test_objectcopier.py:1.10	Sun Sep 21 13:31:41 2003
+++ Zope3/src/zope/app/container/tests/test_objectcopier.py	Fri Nov 21 12:12:00 2003
@@ -21,7 +21,7 @@
 from zope.app.traversing import traverse
 from zope.app.services.tests.placefulsetup import PlacefulSetup
 from zope.component import getAdapter, ComponentLookupError
-from zope.component.adapter import provideAdapter
+from zope.app.tests import ztapi
 from zope.app.interfaces.copypastemove import IObjectCopier
 from zope.app.copypastemove import ObjectCopier
 from zope.app.interfaces.container import IContainer
@@ -33,7 +33,7 @@
     def setUp(self):
         PlacefulSetup.setUp(self)
         PlacefulSetup.buildFolders(self)
-        provideAdapter(None, IObjectCopier, ObjectCopier)
+        ztapi.provideAdapter(None, IObjectCopier, ObjectCopier)
 
     def test_copytosame(self):
         root = self.rootFolder


=== Zope3/src/zope/app/container/tests/test_objectmover.py 1.7 => 1.8 ===
--- Zope3/src/zope/app/container/tests/test_objectmover.py:1.7	Sun Sep 21 13:31:42 2003
+++ Zope3/src/zope/app/container/tests/test_objectmover.py	Fri Nov 21 12:12:00 2003
@@ -21,7 +21,7 @@
 from zope.app.traversing import traverse
 from zope.app.services.tests.placefulsetup import PlacefulSetup
 from zope.component import getAdapter
-from zope.component.adapter import provideAdapter
+from zope.app.tests import ztapi
 from zope.app.interfaces.copypastemove import IObjectMover
 from zope.app.interfaces.content.folder import IFolder
 from zope.app.copypastemove import ObjectMover
@@ -32,7 +32,7 @@
     def setUp(self):
         PlacefulSetup.setUp(self)
         PlacefulSetup.buildFolders(self)
-        provideAdapter(None, IObjectMover, ObjectMover)
+        ztapi.provideAdapter(None, IObjectMover, ObjectMover)
  
     def test_movetosame(self):
         # Should be a noop, because "moving" to same location




More information about the Zope3-Checkins mailing list