--- a/server/test/unittest_ssplanner.py Fri Oct 21 09:23:43 2011 +0200
+++ b/server/test/unittest_ssplanner.py Fri Oct 21 09:23:43 2011 +0200
@@ -16,14 +16,18 @@
# You should have received a copy of the GNU Lesser General Public License along
# with CubicWeb. If not, see <http://www.gnu.org/licenses/>.
-from cubicweb.devtools import init_test_database
+from cubicweb.devtools import TestServerConfiguration, get_test_db_handler
from cubicweb.devtools.repotest import BasePlannerTC, test_plan
from cubicweb.server.ssplanner import SSPlanner
# keep cnx so it's not garbage collected and the associated session closed
def setUpModule(*args):
global repo, cnx
- repo, cnx = init_test_database(apphome=SSPlannerTC.datadir)
+ handler = get_test_db_handler(TestServerConfiguration(
+ 'data', apphome=SSPlannerTC.datadir))
+ handler.build_db_cache()
+ global repo, cnx
+ repo, cnx = handler.get_repo_and_cnx()
def tearDownModule(*args):
global repo, cnx
--- a/server/test/unittest_storage.py Fri Oct 21 09:23:43 2011 +0200
+++ b/server/test/unittest_storage.py Fri Oct 21 09:23:43 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.
@@ -261,7 +261,7 @@
def test_bfss_update_to_None(self):
f = self.session.create_entity('Affaire', opt_attr=Binary('toto'))
self.session.commit()
- self.session.set_pool()
+ self.session.set_cnxset()
f.set_attributes(opt_attr=None)
self.session.commit()