Change assertTrue(isinstance()) by optimal assert

Use assertIsInstance() instead of assertTrue(isinstance())

Change-Id: I8bfc27d72b27b512ac4f3fbb7c1821b9be1dbd06
This commit is contained in:
Tony Xu 2016-10-25 10:25:41 +08:00
parent 4bdc9056c6
commit 25a817c03d

View File

@ -200,7 +200,7 @@ class TestK8sclient(base.TestCase):
for item in api.list_namespaced_node().items:
node = api.read_namespaced_node(name=item.metadata.name)
self.assertTrue(len(node.metadata.labels) > 0)
self.assertTrue(isinstance(node.metadata.labels, dict))
self.assertIsInstance(node.metadata.labels, dict)
class TestK8sclientBeta(base.TestCase):