--- a/cubicweb/server/test/unittest_hook.py Thu Oct 06 21:14:49 2016 +0200
+++ b/cubicweb/server/test/unittest_hook.py Tue Oct 11 10:30:59 2016 +0200
@@ -18,7 +18,8 @@
# with CubicWeb. If not, see <http://www.gnu.org/licenses/>.
"""unit/functional tests for cubicweb.server.hook"""
-from logilab.common.testlib import TestCase, unittest_main, mock_object
+import unittest
+from logilab.common.testlib import mock_object
from cubicweb import devtools
from cubicweb.devtools import fake
@@ -80,7 +81,7 @@
raise HookCalled()
-class HooksRegistryTC(TestCase):
+class HooksRegistryTC(unittest.TestCase):
def setUp(self):
""" called before each test from this class """
@@ -143,4 +144,4 @@
if __name__ == '__main__':
- unittest_main()
+ unittest.main()
--- a/cubicweb/server/test/unittest_querier.py Thu Oct 06 21:14:49 2016 +0200
+++ b/cubicweb/server/test/unittest_querier.py Tue Oct 11 10:30:59 2016 +0200
@@ -20,12 +20,12 @@
"""
from datetime import date, datetime, timedelta, tzinfo
+import unittest
import pytz
from six import PY2, integer_types, binary_type, text_type
-from logilab.common.testlib import TestCase, unittest_main
from rql import BadRQLQuery
from rql.utils import register_function, FunctionDescr
@@ -101,7 +101,7 @@
def get_type(self, solution, args=None):
return 'Int'
-class MakeDescriptionTC(TestCase):
+class MakeDescriptionTC(unittest.TestCase):
def test_known_values(self):
solution = {'A': 'Int', 'B': 'CWUser'}
self.assertEqual(_make_description((Function('max', 'A'), Variable('B')), {}, solution),
@@ -1668,4 +1668,4 @@
cnx.execute('Any A ORDERBY A WHERE U use_email A, U login "admin"').rows)
if __name__ == '__main__':
- unittest_main()
+ unittest.main()
--- a/cubicweb/server/test/unittest_rql2sql.py Thu Oct 06 21:14:49 2016 +0200
+++ b/cubicweb/server/test/unittest_rql2sql.py Tue Oct 11 10:30:59 2016 +0200
@@ -19,9 +19,10 @@
from __future__ import print_function
import sys
+import unittest
from logilab import database as db
-from logilab.common.testlib import TestCase, unittest_main, mock_object
+from logilab.common.testlib import mock_object
from rql import BadRQLQuery
from rql.utils import register_function, FunctionDescr
@@ -2236,7 +2237,7 @@
with self.subTest(rql=rql):
self._check(rql, sql)
-class removeUnsusedSolutionsTC(TestCase):
+class removeUnsusedSolutionsTC(unittest.TestCase):
def test_invariant_not_varying(self):
rqlst = mock_object(defined_vars={})
rqlst.defined_vars['A'] = mock_object(scope=rqlst, stinfo={}, _q_invariant=True)
@@ -2259,4 +2260,4 @@
if __name__ == '__main__':
- unittest_main()
+ unittest.main()
--- a/cubicweb/server/test/unittest_ssplanner.py Thu Oct 06 21:14:49 2016 +0200
+++ b/cubicweb/server/test/unittest_ssplanner.py Tue Oct 11 10:30:59 2016 +0200
@@ -64,5 +64,5 @@
[])])
if __name__ == '__main__':
- from logilab.common.testlib import unittest_main
- unittest_main()
+ import unittest
+ unittest.main()
--- a/cubicweb/test/unittest_spa2rql.py Thu Oct 06 21:14:49 2016 +0200
+++ b/cubicweb/test/unittest_spa2rql.py Tue Oct 11 10:30:59 2016 +0200
@@ -33,7 +33,7 @@
@unittest.skipIf(SKIPCAUSE, SKIPCAUSE)
-class XYTC(TestCase):
+class XYTC(unittest.TestCase):
schema = None
@@ -224,4 +224,4 @@
# }
if __name__ == '__main__':
- unittest_main()
+ unittest.main()