[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/OFS/Services/ServiceManager/tests - PlacefulSetup.py:1.5
Jim Fulton
jim@zope.com
Thu, 1 Aug 2002 14:42:44 -0400
Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/Services/ServiceManager/tests
In directory cvs.zope.org:/tmp/cvs-serv5741/lib/python/Zope/App/OFS/Services/ServiceManager/tests
Modified Files:
PlacefulSetup.py
Log Message:
Removed dependcies of:
Zope.ComponentArchitecture
Zope.Configuration
Zope.Exceptions
Zope.Testing
on other packages, especially App, in preparation for making these
packages part of Zope 2 and useful outside of the Zope application.
In particular, all placeful service support was moved to
Zope.App.ComponentArchitecture.
Placeful service implementors should get the nextService and
nextServiceManager functions from
Zope.App.ComponentArchitecture.NextService.
=== Zope3/lib/python/Zope/App/OFS/Services/ServiceManager/tests/PlacefulSetup.py 1.4 => 1.5 ===
# set up placeful hooks, saving originals for tearDown
from Zope import ComponentArchitecture as CA
self.__old_getServiceManager_hook = CA.getServiceManager_hook
- self.__old_getNextServiceManager_hook = CA.getNextServiceManager_hook
from Zope.App.ComponentArchitecture import hooks
CA.getServiceManager_hook = hooks.getServiceManager_hook
- CA.getNextServiceManager_hook = hooks.getNextServiceManager_hook
+
+ def tearDown(self):
+ # clean up folders and placeful service managers and services too?
+ from Zope import ComponentArchitecture as CA
+ CA.getServiceManager_hook = self.__old_getServiceManager_hook
+ PlacelessSetup.tearDown(self)
def buildFolders(self):
# set up a reasonably complex folder structure
@@ -94,11 +98,4 @@
from Zope.App.OFS.Services.ServiceManager.ServiceManager \
import ServiceManager
folder.setServiceManager(ServiceManager())
-
- def tearDown(self):
- # clean up folders and placeful service managers and services too?
- from Zope import ComponentArchitecture as CA
- CA.getServiceManager_hook = self.__old_getServiceManager_hook
- CA.getNextServiceManager_hook = self.__old_getNextServiceManager_hook
- PlacelessSetup.tearDown(self)