[Zope3-checkins] CVS: Zope3/src/zope/component/tests -
test_service.py:1.5
Jim Fulton
cvs-admin at zope.org
Wed Dec 3 00:41:44 EST 2003
Update of /cvs-repository/Zope3/src/zope/component/tests
In directory cvs.zope.org:/tmp/cvs-serv19321/src/zope/component/tests
Modified Files:
test_service.py
Log Message:
Added the "Services" service. This allows the service manager to
serve itself. :)
=== Zope3/src/zope/component/tests/test_service.py 1.4 => 1.5 ===
--- Zope3/src/zope/component/tests/test_service.py:1.4 Fri Nov 21 12:09:29 2003
+++ Zope3/src/zope/component/tests/test_service.py Wed Dec 3 00:41:43 2003
@@ -29,6 +29,7 @@
from zope.component.service import GlobalServiceManager, GlobalService
from zope.component.exceptions import ComponentLookupError
from zope.component import queryService
+from zope.component.interfaces import IServiceService
class IOne(Interface):
pass
@@ -97,17 +98,18 @@
def testGetServiceDefinitions(self):
# test that the service definitions are the ones we added
- getServiceManager(None).defineService('one', IOne)
+ sm = getServiceManager(None)
+ sm.defineService('one', IOne)
c = ServiceOne()
- getServiceManager(None).provideService('one', c)
+ sm.provideService('one', c)
- getServiceManager(None).defineService('two', ITwo)
+ sm.defineService('two', ITwo)
d = ServiceTwo()
- getServiceManager(None).provideService('two', d)
+ sm.provideService('two', d)
defs = getServiceDefinitions(None)
defs.sort()
self.assertEqual(defs,
- [('one', IOne), ('two', ITwo)])
+ [('Services', IServiceService), ('one', IOne), ('two', ITwo)])
def testPickling(self):
More information about the Zope3-Checkins
mailing list