Commit 2be4f614 authored by Arnaud Fontaine's avatar Arnaud Fontaine

runUnitTest: Set `skip-ownership-checking true` as we already do for a normal...

runUnitTest: Set `skip-ownership-checking true` as we already do for a normal instance through zope.conf.

Related to 58c9f7c3c688854958592590dd396929b5a0c8d4 in slapos.git.
parent 93b5ebff
Pipeline #8616 failed with stage
in 0 seconds
......@@ -507,6 +507,17 @@ def runUnitTestList(test_list, verbosity=1, debug=0, run_only=None):
# ZopeTestCase below (Leo: I hate import side-effects with a passion).
import App.config
cfg = App.config.getConfiguration()
# Zope do not call setDefaultBehaviors() for testing instance as it does for
# a normal instance so `cfg.skip_ownership_checking = True` would not work
# here...
import AccessControl
AccessControl.setDefaultBehaviors(
# ownerous: ERP5 default (zope.conf: `skip-ownership-checking true`)
False,
# authenticated: Zope default (zope.conf: `skip_authentication_checking`)
True,
# verbose: Zope default
False)
cfg.testinghome = instance_home
cfg.instancehome = instance_home
from Zope2.Startup.datatypes import DBTab
......
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