server/test/unittest_checkintegrity.py
brancholdstable
changeset 7254 c0278ad81823
parent 7186 287f2273917f
child 7791 31bb51ea5485
--- a/server/test/unittest_checkintegrity.py	Tue Apr 05 08:39:49 2011 +0200
+++ b/server/test/unittest_checkintegrity.py	Wed Apr 27 09:54:22 2011 +0200
@@ -1,4 +1,4 @@
-# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
+# copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
 #
 # This file is part of CubicWeb.
@@ -19,14 +19,16 @@
 import sys
 from StringIO import StringIO
 from logilab.common.testlib import TestCase, unittest_main
-from cubicweb.devtools import init_test_database
+from cubicweb.devtools import get_test_db_handler, TestServerConfiguration
 
 
 from cubicweb.server.checkintegrity import check, reindex_entities
 
 class CheckIntegrityTC(TestCase):
     def setUp(self):
-        self.repo, self.cnx = init_test_database(apphome=self.datadir)
+        handler = get_test_db_handler(TestServerConfiguration(apphome=self.datadir))
+        handler.build_db_cache()
+        self.repo, self.cnx = handler.get_repo_and_cnx()
         self.execute = self.cnx.cursor().execute
         self.session = self.repo._sessions[self.cnx.sessionid]
         sys.stderr = sys.stdout = StringIO()