From 26fae838bbe0b0899445759843268b076f786f6e Mon Sep 17 00:00:00 2001 From: Luong Anh Tuan Date: Mon, 5 Jun 2017 16:30:33 +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 testtools. Change-Id: Ib32ae0551f5fdc5bfffed8c0fce6cf18f8fae6c8 Closes-Bug: #1268480 --- keystoneauth1/tests/unit/loading/test_adapter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keystoneauth1/tests/unit/loading/test_adapter.py b/keystoneauth1/tests/unit/loading/test_adapter.py index cf72b2ad..f50bca72 100644 --- a/keystoneauth1/tests/unit/loading/test_adapter.py +++ b/keystoneauth1/tests/unit/loading/test_adapter.py @@ -45,7 +45,7 @@ class ConfLoadingTests(utils.TestCase): def test_get_conf_options(self): opts = loading.get_adapter_conf_options() for opt in opts: - self.assertTrue(isinstance(opt, cfg.StrOpt)) + self.assertIsInstance(opt, cfg.StrOpt) self.assertEqual({'service-type', 'service-name', 'interface', 'region-name', 'endpoint-override'}, {opt.name for opt in opts})