Change assertTrue(isinstance()) by optimal assert
Some of tests use different method of assertTrue(isinstance(A, B)) The correct way is to use assertIsInstance(A, B) provided by testtools Change-Id: Ie21fb409edf558409aa4bf5dfe59893c5b544aa8
This commit is contained in:
parent
0ef0da0137
commit
f16e389110
@ -80,8 +80,8 @@ class ExportLocationsTest(base.BaseSharesMixedTest):
|
||||
|
||||
# Check the format of ever-present summary keys
|
||||
self.assertTrue(uuidutils.is_uuid_like(export_location['id']))
|
||||
self.assertTrue(isinstance(export_location['path'],
|
||||
six.string_types))
|
||||
self.assertIsInstance(export_location['path'],
|
||||
six.string_types)
|
||||
|
||||
if utils.is_microversion_ge(version, '2.14'):
|
||||
self.assertIn(export_location['preferred'], (True, False))
|
||||
|
Loading…
Reference in New Issue
Block a user