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:
gecong1973 2016-08-30 15:37:43 +08:00 committed by wangxiyuan
parent 0a8fe0b7be
commit f0d216bf4c

View File

@ -782,7 +782,7 @@ class MessageControllerTest(ControllerBaseTest):
res = self.controller.bulk_get(queue_name, message_ids,
project=self.project)
self.assertTrue(isinstance(res, collections.Iterable))
self.assertIsInstance(res, collections.Iterable)
self.assertEqual([], list(res))