Make unit tests compatible with Python < 2.7.

main
Vincent Driessen 13 years ago
parent b45770cd3c
commit f5951900c8

@ -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()

Loading…
Cancel
Save