From 9863c1b93ddc77d523796aea438968d0ee8906f5 Mon Sep 17 00:00:00 2001 From: Vu Cong Tuan Date: Mon, 12 Jun 2017 15:48:27 +0700 Subject: [PATCH] Replace assertEqual([], items) with assertEmpty(items) Since assertEmpty() function has already been implemented in tempest, let's use this function instead of generic assertEqual() function. This change makes the code and the error messages to be more readable. Therefore it improves maintainability a little bit. TrivialFix Change-Id: I3d671436e9ea2f7cbdda6d3dbf5c8a3f9d7625d4 --- .../tests/api/admin/test_share_group_types.py | 4 ++-- manila_tempest_tests/tests/api/admin/test_share_types.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/manila_tempest_tests/tests/api/admin/test_share_group_types.py b/manila_tempest_tests/tests/api/admin/test_share_group_types.py index 189ab34328..c0c9a97220 100644 --- a/manila_tempest_tests/tests/api/admin/test_share_group_types.py +++ b/manila_tempest_tests/tests/api/admin/test_share_group_types.py @@ -217,7 +217,7 @@ class ShareGroupTypesTest(base.BaseSharesAdminTest): # List projects that have access for share group type - none expected access = self.shares_v2_client.list_access_to_share_group_type(sgt_id) - self.assertEqual([], access) + self.assertEmpty(access) # Add project access to share group type access = self.shares_v2_client.add_access_to_share_group_type( @@ -242,4 +242,4 @@ class ShareGroupTypesTest(base.BaseSharesAdminTest): # List projects that have access for share group type - none expected access = self.shares_v2_client.list_access_to_share_group_type(sgt_id) - self.assertEqual([], access) + self.assertEmpty(access) diff --git a/manila_tempest_tests/tests/api/admin/test_share_types.py b/manila_tempest_tests/tests/api/admin/test_share_types.py index 076e4bc150..2df0561448 100644 --- a/manila_tempest_tests/tests/api/admin/test_share_types.py +++ b/manila_tempest_tests/tests/api/admin/test_share_types.py @@ -160,7 +160,7 @@ class ShareTypesAdminTest(base.BaseSharesAdminTest): # List projects that have access for share type - none expected access = self.shares_v2_client.list_access_to_share_type(st_id) - self.assertEqual([], access) + self.assertEmpty(access) # Add project access to share type access = self.shares_v2_client.add_access_to_share_type( @@ -187,4 +187,4 @@ class ShareTypesAdminTest(base.BaseSharesAdminTest): # List projects that have access for share type - none expected access = self.shares_v2_client.list_access_to_share_type(st_id) - self.assertEqual([], access) + self.assertEmpty(access)