diff -r 5a1b4361a797 -r a747e211266b server/test/unittest_postgres.py --- a/server/test/unittest_postgres.py Fri Oct 16 12:22:48 2015 +0200 +++ b/server/test/unittest_postgres.py Tue Nov 03 18:03:21 2015 +0100 @@ -23,6 +23,7 @@ from logilab.common.testlib import SkipTest +import logilab.database as lgdb from cubicweb import ValidationError from cubicweb.devtools import PostgresApptestConfiguration, startpgcluster, stoppgcluster from cubicweb.devtools.testlib import CubicWebTC @@ -51,6 +52,14 @@ class PostgresFTITC(CubicWebTC): configcls = PostgresTimeoutConfiguration + @classmethod + def setUpClass(cls): + cls.orig_connect_hooks = lgdb.SQL_CONNECT_HOOKS['postgres'][:] + + @classmethod + def tearDownClass(cls): + lgdb.SQL_CONNECT_HOOKS['postgres'] = cls.orig_connect_hooks + def test_eid_range(self): # concurrent allocation of eid ranges source = self.session.repo.sources_by_uri['system']