From f0d216bf4cb61048006464f18bf88842f43e98be Mon Sep 17 00:00:00 2001 From: gecong1973 Date: Tue, 30 Aug 2016 15:37:43 +0800 Subject: [PATCH] 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 --- zaqar/tests/unit/storage/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zaqar/tests/unit/storage/base.py b/zaqar/tests/unit/storage/base.py index adbe96761..45d8775f4 100644 --- a/zaqar/tests/unit/storage/base.py +++ b/zaqar/tests/unit/storage/base.py @@ -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))