Replace assertTrue(isinstance()) with assertIsInstance()

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: I4295e71300387ea80fbe8e1fca7a1c7ce344d4b3
Closes-Bug: #1268480
This commit is contained in:
Luong Anh Tuan 2017-06-05 16:37:29 +07:00
parent 3a86761751
commit 441e887249
1 changed files with 1 additions and 1 deletions

View File

@ -223,7 +223,7 @@ class TestConvertStringToCaseInsensitive(base.BaseTestCase):
def test_convert_string_to_lower(self):
result = converters.convert_string_to_case_insensitive(u"THIS Is tEsT")
self.assertTrue(isinstance(result, six.string_types))
self.assertIsInstance(result, six.string_types)
def test_assert_error_on_non_string(self):
for invalid in [[], 123]: