[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/OFS/ServiceManager/Views/Browser/tests - testBindings.py:1.1.2.4

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


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

Modified Files:
      Tag: Zope-3x-branch
	testBindings.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/Views/Browser/tests/testBindings.py 1.1.2.3 => 1.1.2.4 ===
 from Zope.Testing.CleanUp import CleanUp # Base class w registry cleanup
 
+#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 ITestService1(Interface): pass
 class ITestService2(Interface): pass