[test] update to new db handler api stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 16 Jun 2011 15:16:58 +0200
branchstable
changeset 7522 6f6b334a14b7
parent 7521 a5a5eea29c1b
child 7523 f6856231cc51
[test] update to new db handler api
server/test/unittest_rqlannotation.py
--- a/server/test/unittest_rqlannotation.py	Thu Jun 16 15:16:22 2011 +0200
+++ b/server/test/unittest_rqlannotation.py	Thu Jun 16 15:16:58 2011 +0200
@@ -18,13 +18,16 @@
 # with CubicWeb.  If not, see <http://www.gnu.org/licenses/>.
 """unit tests for modules cubicweb.server.rqlannotation"""
 
-from cubicweb.devtools import init_test_database
+from cubicweb.devtools import TestServerConfiguration, get_test_db_handler
 from cubicweb.devtools.repotest import BaseQuerierTC
 
 
 def setUpModule(*args):
+    handler = get_test_db_handler(TestServerConfiguration(
+        'data2', apphome=SQLGenAnnotatorTC.datadir))
+    handler.build_db_cache()
     global repo, cnx
-    repo, cnx = init_test_database(apphome=SQLGenAnnotatorTC.datadir)
+    repo, cnx = handler.get_repo_and_cnx()
 
 def tearDownModule(*args):
     global repo, cnx