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: I53a368ddb6b0b810e85eaedf42bc05e729a0e511
Closes-Bug: #1268480
This commit is contained in:
Luong Anh Tuan 2017-06-05 16:25:59 +07:00
parent 9564aa464c
commit 8fcd12a65a
1 changed files with 2 additions and 2 deletions

View File

@ -10615,7 +10615,7 @@ class EMCV3ReplicationTest(test.TestCase):
rep_data = model_update['replication_driver_data']
self.assertEqual(fields.ReplicationStatus.ENABLED,
rep_status)
self.assertTrue(isinstance(rep_data, six.text_type))
self.assertIsInstance(rep_data, six.text_type)
self.assertIsNotNone(rep_data)
@mock.patch.object(
@ -10647,7 +10647,7 @@ class EMCV3ReplicationTest(test.TestCase):
rep_data = model_update['replication_driver_data']
self.assertEqual(fields.ReplicationStatus.ENABLED,
rep_status)
self.assertTrue(isinstance(rep_data, six.text_type))
self.assertIsInstance(rep_data, six.text_type)
self.assertTrue(rep_data)
@mock.patch.object(