[Zope3-checkins] CVS: Zope3/src/zope/app/event/tests - test_globaleventchannel.py:1.4

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


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

Modified Files:
	test_globaleventchannel.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/event/tests/test_globaleventchannel.py 1.3 => 1.4 ===
--- Zope3/src/zope/app/event/tests/test_globaleventchannel.py:1.3	Sat Jun  7 02:37:25 2003
+++ Zope3/src/zope/app/event/tests/test_globaleventchannel.py	Fri Nov 21 12:12:04 2003
@@ -21,7 +21,7 @@
 from zope.interface import Interface, implements
 from zope.component.tests.placelesssetup import PlacelessSetup
 from zope.component.tests.components import RecordingAdapter
-from zope.component.adapter import provideAdapter
+from zope.app.tests import ztapi
 
 class ISomeEvent(IEvent):
     pass
@@ -128,7 +128,7 @@
         self.subscriber = SubscriberStub()
         self.filter = lambda x: True
         self.subaware = SubAware()
-        provideAdapter(ISubscriberStub, ISubscribingAware, self.subaware)
+        ztapi.provideAdapter(ISubscriberStub, ISubscribingAware, self.subaware)
 
     def test_subscribe(self):
         self.ec.globalSubscribe(self.subscriber, ISomeEvent, self.filter)
@@ -167,7 +167,7 @@
         self.subscriber = NonSubscriberStub()
         self.event = SomeEvent()
         self.adapter = SubscriberAdapter()
-        provideAdapter(INonSubscriberStub, ISubscriber, self.adapter)
+        ztapi.provideAdapter(INonSubscriberStub, ISubscriber, self.adapter)
 
 class TestAdaptingToISubscriberOnNotify(TestAdaptingToISubscriberBase):
     def setUpChannel(self):




More information about the Zope3-Checkins mailing list