[Zope3-checkins] CVS: Zope3/src/zope/app/services/tests - placefulsetup.py:1.20
Jim Fulton
jim@zope.com
Sun, 18 May 2003 14:07:14 -0400
Update of /cvs-repository/Zope3/src/zope/app/services/tests
In directory cvs.zope.org:/tmp/cvs-serv11328/src/zope/app/services/tests
Modified Files:
placefulsetup.py
Log Message:
Updated hook configuration to use the new hooking machinery.
Also simplified hook zcml configuration. It is no longer necessary to
declare that something is hookable before hooking it. After all, we
can now introspect objects to determine if they are hookable.
=== Zope3/src/zope/app/services/tests/placefulsetup.py 1.19 => 1.20 ===
--- Zope3/src/zope/app/services/tests/placefulsetup.py:1.19 Thu May 1 15:35:35 2003
+++ Zope3/src/zope/app/services/tests/placefulsetup.py Sun May 18 14:06:43 2003
@@ -52,8 +52,7 @@
def setUp(self):
PlacelessSetup.setUp(self)
# set up placeful hooks, saving originals for tearDown
- self.__old_getServiceManager_hook = CA.getServiceManager_hook
- CA.getServiceManager_hook = hooks.getServiceManager_hook
+ CA.getServiceManager.sethook(hooks.getServiceManager_hook)
self.setUpTraversal()
def setUpTraversal(self):
@@ -86,7 +85,7 @@
def tearDown(self):
# clean up folders and placeful service managers and services too?
- CA.getServiceManager_hook = self.__old_getServiceManager_hook
+ CA.getServiceManager.reset()
PlacelessSetup.tearDown(self)
def buildFolders(self):