Change assertTrue(isinstance()) by optimal assert

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: I4d2cfee5b7a1aa10c308e92e3519597234f57bf7
This commit is contained in:
zhangyanxian 2016-08-19 02:00:09 +00:00
parent 4e7301e727
commit c5dd228fc1
1 changed files with 1 additions and 1 deletions

View File

@ -50,4 +50,4 @@ class TestBarbicanACLAuth(base.BaseTestCase):
def test_load_auth_driver(self):
bcm = barbican_cert_manager.CertManager()
self.assertTrue(isinstance(bcm.auth, barbican_acl.BarbicanACLAuth))
self.assertIsInstance(bcm.auth, barbican_acl.BarbicanACLAuth)