server/test/unittest_checkintegrity.py
changeset 8578 f6ea4ea63d57
parent 8544 3d049071957e
child 9576 5d4f662f5e31
--- a/server/test/unittest_checkintegrity.py	Thu Sep 20 16:18:13 2012 +0200
+++ b/server/test/unittest_checkintegrity.py	Thu Sep 20 16:33:51 2012 +0200
@@ -29,8 +29,9 @@
         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]
+        session = self.repo._get_session(self.cnx.sessionid, setcnxset=True)
+        self.session = session
+        self.execute = session.execute
         sys.stderr = sys.stdout = StringIO()
 
     def tearDown(self):