[Zope3-checkins] CVS: Zope3/src/zope/app/cache/tests - test_annotationcacheable.py:1.10 test_caching.py:1.10

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


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

Modified Files:
	test_annotationcacheable.py test_caching.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/cache/tests/test_annotationcacheable.py 1.9 => 1.10 ===
--- Zope3/src/zope/app/cache/tests/test_annotationcacheable.py:1.9	Tue Aug 19 13:34:12 2003
+++ Zope3/src/zope/app/cache/tests/test_annotationcacheable.py	Fri Nov 21 12:12:00 2003
@@ -16,6 +16,7 @@
 $Id$
 """
 from unittest import TestCase, TestSuite, main, makeSuite
+from zope.app.tests import ztapi
 from zope.app.tests.placelesssetup import PlacelessSetup
 from zope.component import getService
 from zope.app.services.servicenames import Adapters
@@ -53,7 +54,7 @@
 class TestAnnotationCacheable(PlacelessSetup, TestCase):
     def setUp(self):
         PlacelessSetup.setUp(self)
-        getService(None, Adapters).provideAdapter(
+        ztapi.provideAdapter(
             IAttributeAnnotatable, IAnnotations,
             AttributeAnnotations)
         self.service = CachingServiceStub()


=== Zope3/src/zope/app/cache/tests/test_caching.py 1.9 => 1.10 ===
--- Zope3/src/zope/app/cache/tests/test_caching.py:1.9	Tue Aug 19 13:34:12 2003
+++ Zope3/src/zope/app/cache/tests/test_caching.py	Fri Nov 21 12:12:00 2003
@@ -17,6 +17,7 @@
 """
 
 from unittest import TestCase, TestSuite, main, makeSuite
+from zope.app.tests import ztapi
 from zope.app.interfaces.cache import ICacheable, ICachingService
 from zope.app.cache.caching import getCacheForObj
 from zope.app.cache.annotationcacheable import AnnotationCacheable
@@ -52,10 +53,10 @@
 
     def setUp(self):
         PlacelessSetup.setUp(self)
-        getService(None, Adapters).provideAdapter(
+        ztapi.provideAdapter(
             IAttributeAnnotatable, IAnnotations,
             AttributeAnnotations)
-        getService(None, Adapters).provideAdapter(
+        ztapi.provideAdapter(
             IAnnotatable, ICacheable,
             AnnotationCacheable)
         self.service = CachingServiceStub()




More information about the Zope3-Checkins mailing list