[PATCH 10 of 10 logilab-database] DeprecationWarning: Please use assertTrue instead

Laurent Peuch cortex at worlddomination.be
Fri Apr 3 09:14:18 CEST 2020


# HG changeset patch
# User Laurent Peuch <cortex at worlddomination.be>
# Date 1585791365 -7200
#      Thu Apr 02 03:36:05 2020 +0200
# Node ID b5009bac0bc34c7322210b79a79b5834e3d6b7b4
# Parent  62ed8ca247985cc3c60c78e5c5da83aa20ecc162
# Available At https://hg.logilab.org/users/lpeuch/logilab-database
#              hg pull https://hg.logilab.org/users/lpeuch/logilab-database -r b5009bac0bc3
# EXP-Topic good-practice-modernisation
DeprecationWarning: Please use assertTrue instead.

diff --git a/test/unittest_db.py b/test/unittest_db.py
--- a/test/unittest_db.py
+++ b/test/unittest_db.py
@@ -183,12 +183,12 @@ class DBAPIAdaptersTC(unittest.TestCase)
             helper = get_db_helper("postgres")
         except ImportError:
             self.skipTest("postgresql dbapi module not installed")
-        self.failUnless(isinstance(helper, _PGAdvFuncHelper))
+        self.assertTrue(isinstance(helper, _PGAdvFuncHelper))
         try:
             helper = get_db_helper("sqlite")
         except ImportError:
             self.skipTest("sqlite dbapi module not installed")
-        self.failUnless(isinstance(helper, _SqliteAdvFuncHelper))
+        self.assertTrue(isinstance(helper, _SqliteAdvFuncHelper))
 
     def test_register_funcdef(self):
         class MYFUNC(FunctionDescr):



More information about the cubicweb-devel mailing list