From c5dd228fc1cfc4ddaa9bb3c18b49df63e66cc361 Mon Sep 17 00:00:00 2001 From: zhangyanxian Date: Fri, 19 Aug 2016 02:00:09 +0000 Subject: [PATCH] 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 --- .../unit/common/cert_manager/barbican_auth/test_barbican_acl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neutron_lbaas/tests/unit/common/cert_manager/barbican_auth/test_barbican_acl.py b/neutron_lbaas/tests/unit/common/cert_manager/barbican_auth/test_barbican_acl.py index 8bad17804..a9f4757ba 100644 --- a/neutron_lbaas/tests/unit/common/cert_manager/barbican_auth/test_barbican_acl.py +++ b/neutron_lbaas/tests/unit/common/cert_manager/barbican_auth/test_barbican_acl.py @@ -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)