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
This commit is contained in:
Luong Anh Tuan 2017-06-05 16:30:33 +07:00
parent aec306a269
commit 26fae838bb
1 changed files with 1 additions and 1 deletions

View File

@ -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})