Change assertTrue(isinstance()) by optimal assert
Some of tests use different method of assertTrue(isinstance(A, B)) or assertEqual(type(A), B). The correct way is to use assertIsInstance(A, B) provided by testtools Change-Id: I15ff9fdab8cdf098634a48879e8992a59bfa91b2
This commit is contained in:
parent
0a8fe0b7be
commit
f0d216bf4c
@ -782,7 +782,7 @@ class MessageControllerTest(ControllerBaseTest):
|
|||||||
res = self.controller.bulk_get(queue_name, message_ids,
|
res = self.controller.bulk_get(queue_name, message_ids,
|
||||||
project=self.project)
|
project=self.project)
|
||||||
|
|
||||||
self.assertTrue(isinstance(res, collections.Iterable))
|
self.assertIsInstance(res, collections.Iterable)
|
||||||
self.assertEqual([], list(res))
|
self.assertEqual([], list(res))
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user