Commit 5a77fb50 authored by Stefan H. Holek's avatar Stefan H. Holek

Use a layer to load the CA. We seem to have gotten it by accident before, oops.

parent bf82aebd
...@@ -5,6 +5,9 @@ Zope2.startup() ...@@ -5,6 +5,9 @@ Zope2.startup()
import transaction import transaction
from zope.testing import cleanup
from Products.Five import zcml
from Testing.makerequest import makerequest from Testing.makerequest import makerequest
from AccessControl.SecurityManagement import newSecurityManager from AccessControl.SecurityManagement import newSecurityManager
...@@ -55,12 +58,27 @@ class TestFolder(Folder): ...@@ -55,12 +58,27 @@ class TestFolder(Folder):
from Products.Five.eventconfigure import setDeprecatedManageAddDelete 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): class HookTest(unittest.TestCase):
layer = HookLayer
def setUp(self): def setUp(self):
self.app = makerequest(Zope2.app()) self.app = makerequest(Zope2.app())
try: try:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment