[Zope3-checkins] CVS: Zope3/src/zope/app/services/tests - test_eventservice.py:1.23

Steve Alexander steve@cat-box.net
Tue, 3 Jun 2003 10:45:29 -0400


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

Modified Files:
	test_eventservice.py 
Log Message:
used new implements()


=== Zope3/src/zope/app/services/tests/test_eventservice.py 1.22 => 1.23 ===
--- Zope3/src/zope/app/services/tests/test_eventservice.py:1.22	Sun Jun  1 11:59:36 2003
+++ Zope3/src/zope/app/services/tests/test_eventservice.py	Tue Jun  3 10:45:28 2003
@@ -18,7 +18,7 @@
 """
 
 from unittest import TestCase, TestLoader, TextTestRunner
-from zope.interface import Interface
+from zope.interface import Interface, implements
 from zope.app.services.service import ServiceManager, ServiceConfiguration
 from zope.app.services.servicenames import EventPublication, EventSubscription
 from zope.app.services.event import EventService
@@ -49,11 +49,11 @@
 
 class DummyEvent:
 
-    __implements__ = IObjectAddedEvent, IObjectRemovedEvent
+    implements(IObjectAddedEvent, IObjectRemovedEvent)
 
 class ObjectEvent:
 
-    __implements__ = IObjectEvent
+    implements(IObjectEvent)
 
 class IObjectHub(Interface):
     def getObject(hubid):
@@ -66,7 +66,7 @@
         "gets location"
 
 class DumbObjectHub:
-    __implements__ = IObjectHub, ISimpleService
+    implements(IObjectHub, ISimpleService)
 
     def __init__(self):
         # (location, object)
@@ -93,12 +93,12 @@
     pass
 
 class HasSubscribingAwareAdapter(DummySubscriber):
-    __implements__ = IHasSubscribingAwareAdapter, ISubscriber
+    implements(IHasSubscribingAwareAdapter, ISubscriber)
 
 
 class SubscribingAwareAdapter(RecordingAdapter):
 
-    __implements__ = ISubscribingAware
+    implements(ISubscribingAware)
 
     def subscribedTo(self, subscribable, event_type, filter):
         self.record.append(('subscribed', self.context, subscribable,
@@ -223,7 +223,7 @@
         # curve balls:
         unsubscribeAll(self.folder1Subscriber, context=self.folder1_1)
         unsubscribe(2,
-                    event_type=IObjectAddedEvent, 
+                    event_type=IObjectAddedEvent,
                     context=self.folder1_1)
         publish(self.folder1, ObjectAddedEvent(None, '/foo'))
         self.assertEqual(self.rootFolderSubscriber.notified, 1)