[test] silent warning stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 06 Apr 2011 22:52:50 +0200
branchstable
changeset 7189 0c2c41fcb89d
parent 7188 b2c45b7396fb
child 7190 f72e3f4666b0
[test] silent warning
server/test/unittest_msplanner.py
--- 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