Merge "Fix assertTrue in verifying whether data type is list"

This commit is contained in:
Zuul 2020-02-04 03:30:57 +00:00 committed by Gerrit Code Review
commit 889e1211d7
2 changed files with 2 additions and 2 deletions

View File

@ -90,5 +90,5 @@ class TestVnfPackage(SqlTestCase):
vnf_pack_list_obj = objects.VnfPackagesList(self.context)
result = vnf_package._make_vnf_packages_list(
self.context, vnf_pack_list_obj, response, None)
self.assertTrue(isinstance(result, objects.VnfPackagesList))
self.assertIsInstance(result, objects.VnfPackagesList)
self.assertTrue(result.objects[0].id)

View File

@ -122,7 +122,7 @@ class TestVnfPackage(SqlTestCase):
def test_get_all(self):
result = objects.VnfPackagesList.get_all(self.context,
expected_attrs=None)
self.assertTrue(result.objects, list)
self.assertIsInstance(result.objects, list)
self.assertTrue(result.objects)
def test_get_by_id_with_flavours(self):