Log message for revision 39844:
  Run standalone, and do proper setup/teardown.
  

Changed:
  U   
Zope/branches/philikon-zope32-integration/lib/python/OFS/tests/testObjectManager.py

-=-
Modified: 
Zope/branches/philikon-zope32-integration/lib/python/OFS/tests/testObjectManager.py
===================================================================
--- 
Zope/branches/philikon-zope32-integration/lib/python/OFS/tests/testObjectManager.py
 2005-11-02 11:35:33 UTC (rev 39843)
+++ 
Zope/branches/philikon-zope32-integration/lib/python/OFS/tests/testObjectManager.py
 2005-11-02 13:49:12 UTC (rev 39844)
@@ -3,12 +3,16 @@
 from AccessControl.Owned import EmergencyUserCannotOwn
 from AccessControl.SecurityManagement import newSecurityManager
 from AccessControl.SecurityManagement import noSecurityManager
+from AccessControl.User import User # before SpecialUsers
 from AccessControl.SpecialUsers import emergency_user, nobody, system
-from AccessControl.User import User
 from Acquisition import Implicit
 from App.config import getConfiguration
 from OFS.ObjectManager import ObjectManager
 from OFS.SimpleItem import SimpleItem
+from zope.app.testing.placelesssetup import PlacelessSetup
+import Products.Five
+from Products.Five import zcml
+from Products.Five.eventconfigure import setDeprecatedManageAddDelete
 
 
 class FauxRoot( Implicit ):
@@ -53,23 +57,26 @@
     def manage_afterClone(self, item):
         pass
 
-from Products.Five.eventconfigure import setDeprecatedManageAddDelete
-setDeprecatedManageAddDelete(ItemForDeletion)
-
 from zope.interface import implements
 from OFS.interfaces import IItem
 class ObjectManagerWithIItem(ObjectManager):
     """The event subscribers work on IItem."""
     implements(IItem)
 
-class ObjectManagerTests( unittest.TestCase ):
+class ObjectManagerTests(PlacelessSetup, unittest.TestCase):
 
     def setUp(self):
+        super(ObjectManagerTests, self).setUp()
         self.saved_cfg_debug_mode = getConfiguration().debug_mode
+        zcml.load_config('meta.zcml', Products.Five)
+        zcml.load_config('event.zcml', Products.Five)
+        zcml.load_config('deprecated.zcml', Products.Five)
+        setDeprecatedManageAddDelete(ItemForDeletion)
 
     def tearDown( self ):
         noSecurityManager()
         getConfiguration().debug_mode = self.saved_cfg_debug_mode
+        super(ObjectManagerTests, self).tearDown()
 
     def setDebugMode(self, mode):
         getConfiguration().debug_mode = mode

_______________________________________________
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins

Reply via email to