Commit 19014866 authored by Stefan H. Holek's avatar Stefan H. Holek

Merged trunk r95406 into 2.10 branch.

Use a layer to load the CA (we need the container handlers).
parent 8dfc1e97
......@@ -5,6 +5,9 @@ Zope2.startup()
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 @@ class TestFolder(Folder):
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:
......
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