mirror of https://github.com/rq/rq.git
Make unit tests compatible with Python < 2.7.
This commit is contained in:
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…
Reference in New Issue