From 25a817c03d1890a28a373f180abaa31cf9e02a4f Mon Sep 17 00:00:00 2001 From: Tony Xu Date: Tue, 25 Oct 2016 10:25:41 +0800 Subject: [PATCH] Change assertTrue(isinstance()) by optimal assert Use assertIsInstance() instead of assertTrue(isinstance()) Change-Id: I8bfc27d72b27b512ac4f3fbb7c1821b9be1dbd06 --- k8sclient/tests/test_k8sclient.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/k8sclient/tests/test_k8sclient.py b/k8sclient/tests/test_k8sclient.py index 563c8b7..23b1818 100644 --- a/k8sclient/tests/test_k8sclient.py +++ b/k8sclient/tests/test_k8sclient.py @@ -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):