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:
gecong1973 2016-08-30 15:56:14 +08:00 committed by gecong
parent 0ef0da0137
commit f16e389110

View File

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