[Zope3-checkins] CVS: Zope3/src/zope/app/services/tests - test_servicemanager.py:1.14
Jim Fulton
jim@zope.com
Mon, 30 Jun 2003 12:26:16 -0400
Update of /cvs-repository/Zope3/src/zope/app/services/tests
In directory cvs.zope.org:/tmp/cvs-serv18940/src/zope/app/services/tests
Modified Files:
test_servicemanager.py
Log Message:
Service managers no longer try to be module services.
=== Zope3/src/zope/app/services/tests/test_servicemanager.py 1.13 => 1.14 ===
--- Zope3/src/zope/app/services/tests/test_servicemanager.py:1.13 Sat Jun 21 17:22:13 2003
+++ Zope3/src/zope/app/services/tests/test_servicemanager.py Mon Jun 30 12:26:15 2003
@@ -159,7 +159,10 @@
service = getService(self.folder1, 'test_service')
self.assertEqual(service, ts)
- def test_resolve(self):
+ def donttest_resolve(self):
+ # XXX This test expects that the local module implementation
+ # (the Manager class) to register itself. This is no longer
+ # intentional behavior; the right tests need to be determined.
from zope.app.context import ContextWrapper as cw
from zope.app.services.module import Manager
import zope.app.services.tests.sample1
@@ -168,21 +171,22 @@
sm = self.makeSite()
default = cw(sm['default'], self.rootFolder, name='default')
- default.setObject('m1', Manager())
+ default.setObject('m1', Manager('zope.app.services.tests.sample1',
+ 'x = "root m1"\n'))
manager = cw(default['m1'], default, name='m1')
- manager.new('zope.app.services.tests.sample1',
- 'x = "root m1"\n')
- default.setObject('m2', Manager())
+ manager.execute()
+ default.setObject('m2', Manager('XXX.ZZZ',
+ 'x = "root m2"\nZZZ = 42\n'))
manager = cw(default['m2'], default, name='m2')
- manager.new('XXX.ZZZ', 'x = "root m2"\nZZZ = 42\n')
+ manager.execute()
self.folder1.setServiceManager(ServiceManager())
sm2=getServiceManager(self.folder1)
default = cw(sm2['default'], self.folder1, name='default')
- default.setObject('m1', Manager())
+ default.setObject('m1', Manager('zope.app.services.tests.sample1',
+ 'x = "folder1 m1 1"'))
manager = cw(default['m1'], default, name='m1')
- manager.new('zope.app.services.tests.sample1',
- 'x = "folder1 m1 1"')
+ manager.execute()
self.assertEqual(
sm2.resolve("zope.app.services.tests.sample1.x"),