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. There has one more place should be modified. Closes-bug: #1268480 Change-Id: I05d1b75289e193a32bd4d0ba0557af3fad686880
This commit is contained in:
parent
007e1f982b
commit
1a9d0b713d
|
@ -41,8 +41,8 @@ class TypesTest(utils.TestCase):
|
|||
|
||||
self.assertTrue(hasattr(share_type, '_required_extra_specs'))
|
||||
self.assertTrue(hasattr(share_type, '_optional_extra_specs'))
|
||||
self.assertTrue(isinstance(share_type._required_extra_specs, dict))
|
||||
self.assertTrue(isinstance(share_type._optional_extra_specs, dict))
|
||||
self.assertIsInstance(share_type._required_extra_specs, dict)
|
||||
self.assertIsInstance(share_type._optional_extra_specs, dict)
|
||||
self.assertEqual(
|
||||
{'snapshot_support': 'False'}, share_type.get_optional_keys())
|
||||
|
||||
|
|
Loading…
Reference in New Issue