[server/test] bootstrap config in setUpModule function
authorPhilippe Pepiot <philippe.pepiot@logilab.fr>
Wed, 13 Mar 2019 14:03:45 +0100
changeset 12513 6f42f1460f99
parent 12512 661dd0436c01
child 12514 eac7f5b20f9f
[server/test] bootstrap config in setUpModule function This is test initialization, so use the setUpModule function for this
cubicweb/server/test/unittest_hook.py
--- a/cubicweb/server/test/unittest_hook.py	Mon Mar 11 17:43:23 2019 +0100
+++ b/cubicweb/server/test/unittest_hook.py	Wed Mar 13 14:03:45 2019 +0100
@@ -63,9 +63,11 @@
     pass
 
 
-config = devtools.TestServerConfiguration('data', __file__)
-config.bootstrap_cubes()
-schema = config.load_schema()
+def setUpModule():
+    global config, schema
+    config = devtools.TestServerConfiguration('data', __file__)
+    config.bootstrap_cubes()
+    schema = config.load_schema()
 
 def tearDownModule(*args):
     global config, schema