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:
parent
aec306a269
commit
26fae838bb
|
@ -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})
|
||||
|
|
Loading…
Reference in New Issue