From 7791110b2fe4b01dc58078ce3358b4b8a5ead0f4 Mon Sep 17 00:00:00 2001 From: Van Hung Pham Date: Wed, 14 Jun 2017 11:03:10 +0700 Subject: [PATCH] Replace assertTrue(isinstance()) with assertIsInstance() 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 test tools. Change-Id: Ibb5e5f848c5632f7c1895c47b8c1a938f2c746c3 --- glanceclient/tests/unit/test_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glanceclient/tests/unit/test_utils.py b/glanceclient/tests/unit/test_utils.py index c0810263..cd87e215 100644 --- a/glanceclient/tests/unit/test_utils.py +++ b/glanceclient/tests/unit/test_utils.py @@ -202,7 +202,7 @@ class TestUtils(testtools.TestCase): # Proxy object should succeed in behaving as the # wrapped object - self.assertTrue(isinstance(proxy, type(gen_obj))) + self.assertIsInstance(proxy, type(gen_obj)) # Initially request_ids should be empty self.assertEqual([], proxy.request_ids)