[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/OFS/ServiceManager/tests - testServiceManager.py:1.1.2.5

Gary Poster garyposter@earthlink.net
Wed, 17 Apr 2002 15:13:07 -0400


Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/ServiceManager/tests
In directory cvs.zope.org:/tmp/cvs-serv31331/App/OFS/ServiceManager/tests

Modified Files:
      Tag: Zope-3x-branch
	testServiceManager.py 
Log Message:
This commit makes the following changes:

The hookable zcml mechanism now requires an intermediary method to overwrite: see the hookables in Zope.ComponentArchitecture for an example

IServiceService, Service, and ServiceManager now all have this signature for the getService method: name.  They did use context, name.  The context, name signature is still used for the main ComponentArchitecture getService function.

the getServiceDefinition function now requires context

A ServiceContainer returns a wrapped ServiceManager; a ServiceManager returns a wrapped Service.

ServiceManager now overrides two ComponentArchitecture hooks: getServiceManager and getNextServiceManager

getNextServiceManager and getNextService are two new ComponentArchitecture functions useful for placeful services

The Zope.Publisher.Browser.BrowserRequest now includes the Zope2 class definition of record: this means that the placeful RoleService is inching forward towards working.

tests have been updated to reflect these changes.



=== Zope3/lib/python/Zope/App/OFS/ServiceManager/tests/testServiceManager.py 1.1.2.4 => 1.1.2.5 ===
 from Zope.App.OFS.ServiceManager.ServiceManager import ServiceManager
 from Zope.Testing.CleanUp import CleanUp # Base class w registry cleanup
-from Zope.App.OFS.ServiceManager.hooks import _getService as getService
-from Zope.ComponentArchitecture import provideService # getService should be local type above
+from Zope.ComponentArchitecture import provideService, getService
 from Zope.ComponentArchitecture import defineService
 from Zope.Exceptions import ZopeError
+
+#set up hooks
+from Zope.App.OFS.ServiceManager.hooks import getServiceManager_hook, \
+     getNextServiceManager_hook
+from Zope.ComponentArchitecture import hooks
+hooks.getServiceManager_hook=getServiceManager_hook
+hooks.getNextServiceManager_hook=getNextServiceManager_hook
 
 class ITestService(Interface): pass