Merge "Modify use of assertTrue(A in B)"
diff --git a/manila_tempest_tests/tests/api/admin/test_shares_actions.py b/manila_tempest_tests/tests/api/admin/test_shares_actions.py
index 1e638eb..72edd6b 100644
--- a/manila_tempest_tests/tests/api/admin/test_shares_actions.py
+++ b/manila_tempest_tests/tests/api/admin/test_shares_actions.py
@@ -173,7 +173,7 @@
self.assertTrue(len(shares) > 0)
shares_ids = [s["id"] for s in shares]
for share in self.shares:
- self.assertTrue(share["id"] in shares_ids)
+ self.assertIn(share["id"], shares_ids)
for share in shares:
# find its name or id, get id
st_id = None
@@ -218,7 +218,7 @@
filters['share_type_id'], st_id)
share_ids = [share['id'] for share in shares]
for share in self.shares:
- self.assertTrue(share['id'] in share_ids)
+ self.assertIn(share['id'], share_ids)
@tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND)
def test_list_shares_with_detail_filter_by_host(self):
diff --git a/manila_tempest_tests/tests/scenario/test_share_basic_ops.py b/manila_tempest_tests/tests/scenario/test_share_basic_ops.py
index 34c9c55..0e2e390 100644
--- a/manila_tempest_tests/tests/scenario/test_share_basic_ops.py
+++ b/manila_tempest_tests/tests/scenario/test_share_basic_ops.py
@@ -337,11 +337,11 @@
self.umount_share(ssh_client)
- self.assertTrue('1m1.bin' in output)
- self.assertTrue('1m2.bin' in output)
- self.assertTrue('1m3.bin' in output)
- self.assertTrue('1m4.bin' in output)
- self.assertTrue('1m5.bin' in output)
+ self.assertIn('1m1.bin', output)
+ self.assertIn('1m2.bin', output)
+ self.assertIn('1m3.bin', output)
+ self.assertIn('1m4.bin', output)
+ self.assertIn('1m5.bin', output)
class TestShareBasicOpsNFS(ShareBasicOpsBase):