[Zope3-checkins] CVS: Zope3/src/zope/app/cache/tests - test_cachename.py:1.5

Steve Alexander steve@cat-box.net
Thu, 5 Jun 2003 08:03:45 -0400


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

Modified Files:
	test_cachename.py 
Log Message:
Placeful setup for tests now sets up a  ZopeContainerDecorator.
This means that in such tests, you no longer need to use
ZopeContainerAdapter to get the correct events issued, and perform context-
wrapping duties, when you use a container.
However, it does mean that your tests need to expect these events and
context-wrappers to be used.



=== Zope3/src/zope/app/cache/tests/test_cachename.py 1.4 => 1.5 ===
--- Zope3/src/zope/app/cache/tests/test_cachename.py:1.4	Tue Jun  3 17:42:59 2003
+++ Zope3/src/zope/app/cache/tests/test_cachename.py	Thu Jun  5 08:03:14 2003
@@ -24,14 +24,20 @@
 from zope.app.services.tests.placefulsetup import PlacefulSetup
 from zope.app.tests import setup
 from zope.app.interfaces.services.service import ILocalService
+from zope.app.interfaces.annotation import IAttributeAnnotatable
+from zope.interface import implements
 
-class CachingServiceStub(object):
+__metaclass__ = type
 
-    __implements__ = ILocalService
+class CachingServiceStub:
+
+    implements(ILocalService, IAttributeAnnotatable)
 
     def getAvailableCaches(self):
         return 'foo', 'bar', 'baz'
 
+    # IAttributeAnnotatable is implemented so that there will be an
+    # IDependable adapter available.
 
 class CacheNameTest(PlacefulSetup, unittest.TestCase):