Use assertIsInstance.
This commit is contained in:
@@ -42,6 +42,6 @@ class CeleryConfigTest(unittest.TestCase):
|
||||
|
||||
# We don't know the other dict values exactly,
|
||||
# but we can assert that they take the right form
|
||||
self.assertTrue(isinstance(result_dict['task_id'], unicode))
|
||||
self.assertTrue(isinstance(result_dict['time'], float))
|
||||
self.assertIsInstance(result_dict['task_id'], unicode)
|
||||
self.assertIsInstance(result_dict['time'], float)
|
||||
self.assertTrue(result_dict['time'] > 0.0)
|
||||
|
||||
Reference in New Issue
Block a user