Change assertTrue(isinstance()) by optimal assert
assertTrue(isinstance(A, B)) or assertEqual(type(A), B) in tests should be replaced by assertIsInstance(A, B) provided by testtools. Change-Id: I7135d3b7fe15b16c17b7581e553ce5d289b58f43 Related-bug: #1268480
This commit is contained in:
parent
2973489622
commit
c7fc0d6b1d
|
@ -275,7 +275,7 @@ class TestClient(testtools.TestCase):
|
|||
headers={"Content-Type": "application/octet-stream"})
|
||||
|
||||
resp, body = self.client.get(path)
|
||||
self.assertTrue(isinstance(body, types.GeneratorType))
|
||||
self.assertIsInstance(body, types.GeneratorType)
|
||||
self.assertEqual([data], list(body))
|
||||
|
||||
@original_only
|
||||
|
|
Loading…
Reference in New Issue