diff --git a/tests/__init__.py b/tests/__init__.py index c46f6ef..09c4e4b 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -59,6 +59,11 @@ class RQTestCase(unittest.TestCase): # Flush afterwards self.testconn.flushdb() + # Implement assertIsNotNone for Python runtimes < 2.7 or < 3.1 + if not hasattr(unittest.TestCase, 'assertIsNotNone'): + def assertIsNotNone(self, value, *args): + self.assertNotEqual(value, None, *args) + @classmethod def tearDownClass(cls): cls.log_handler.pop_thread()