Change assertTrue(isinstance()) by optimal assert
Use assertIsInstance() instead of assertTrue(isinstance()) Change-Id: I8bfc27d72b27b512ac4f3fbb7c1821b9be1dbd06
This commit is contained in:
parent
4bdc9056c6
commit
25a817c03d
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user