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: I3e3917db4f62cc713e0edcef81f2d4d8bb867067
Closes-Bug: #1268480
This commit is contained in:
Luong Anh Tuan 2017-06-05 16:40:20 +07:00
parent 5c5b2e0af6
commit bb24705cea
1 changed files with 2 additions and 2 deletions

View File

@ -258,8 +258,8 @@ class DPMdriverVolumeTestCase(TestCase):
def test_get_volume_drivers(self):
driver_reg = self.dpmdriver._get_volume_drivers()
self.assertTrue(isinstance(driver_reg['fibre_channel'],
fibrechannel.DpmFibreChannelVolumeDriver))
self.assertIsInstance(driver_reg['fibre_channel'],
fibrechannel.DpmFibreChannelVolumeDriver)
@mock.patch.object(fibrechannel.DpmFibreChannelVolumeDriver,
'connect_volume')