[Zope-Checkins] SVN: Zope/trunk/lib/python/OFS/tests/testCopySupportHooks.py Use a layer to load the CA. We seem to have gotten it by accident before, oops.
Stefan H. Holek
stefan at epy.co.at
Thu Jan 29 06:17:39 EST 2009
Log message for revision 95406:
Use a layer to load the CA. We seem to have gotten it by accident before, oops.
Changed:
U Zope/trunk/lib/python/OFS/tests/testCopySupportHooks.py
-=-
Modified: Zope/trunk/lib/python/OFS/tests/testCopySupportHooks.py
===================================================================
--- Zope/trunk/lib/python/OFS/tests/testCopySupportHooks.py 2009-01-29 11:09:37 UTC (rev 95405)
+++ Zope/trunk/lib/python/OFS/tests/testCopySupportHooks.py 2009-01-29 11:17:39 UTC (rev 95406)
@@ -5,6 +5,9 @@
import transaction
+from zope.testing import cleanup
+from Products.Five import zcml
+
from Testing.makerequest import makerequest
from AccessControl.SecurityManagement import newSecurityManager
@@ -55,12 +58,27 @@
from Products.Five.eventconfigure import setDeprecatedManageAddDelete
-setDeprecatedManageAddDelete(TestItem)
-setDeprecatedManageAddDelete(TestFolder)
+class HookLayer:
+ @classmethod
+ def setUp(cls):
+ cleanup.cleanUp()
+ zcml._initialized = 0
+ zcml.load_site()
+ setDeprecatedManageAddDelete(TestItem)
+ setDeprecatedManageAddDelete(TestFolder)
+
+ @classmethod
+ def tearDown(cls):
+ cleanup.cleanUp()
+ zcml._initialized = 0
+
+
class HookTest(unittest.TestCase):
+ layer = HookLayer
+
def setUp(self):
self.app = makerequest(Zope2.app())
try:
More information about the Zope-Checkins
mailing list