server/test/unittest_msplanner.py
branchstable
changeset 7189 0c2c41fcb89d
parent 7188 b2c45b7396fb
child 7306 a21bafe9fe35
--- a/server/test/unittest_msplanner.py	Wed Apr 06 22:52:39 2011 +0200
+++ b/server/test/unittest_msplanner.py	Wed Apr 06 22:52:50 2011 +0200
@@ -23,7 +23,7 @@
 from yams.buildobjs import RelationDefinition
 from rql import BadRQLQuery
 
-from cubicweb.devtools import init_test_database
+from cubicweb.devtools import get_test_db_handler, TestServerConfiguration
 from cubicweb.devtools.repotest import BasePlannerTC, test_plan
 
 class _SetGenerator(object):
@@ -82,7 +82,9 @@
 # keep cnx so it's not garbage collected and the associated session is closed
 def setUpModule(*args):
     global repo, cnx
-    repo, cnx = init_test_database(apphome=BaseMSPlannerTC.datadir)
+    handler = get_test_db_handler(TestServerConfiguration(apphome=BaseMSPlannerTC.datadir))
+    handler.build_db_cache()
+    repo, cnx = handler.get_repo_and_cnx()
 
 def tearDownModule(*args):
     global repo, cnx