commit | 9d11c95a5f06ec0dc63d2085348146b112c2f184 | [log] [tgz] |
---|---|---|
author | Béla Vancsics <vancsics@inf.u-szeged.hu> | Wed Feb 08 11:07:02 2017 +0100 |
committer | Béla Vancsics <vancsics@inf.u-szeged.hu> | Thu Feb 09 06:47:38 2017 +0100 |
tree | 8a5be5eec0f90978163ed792dd6aedda837d932a | |
parent | 7a25e9824c671f4b98c82f5de1d5e35eeefd3dcf [diff] |
Use more specific asserts in tests Instead of assertTrue and assertFalse use more specific asserts. They are compatible with Python 2.7[1] and 3.4[2] [1]: https://docs.python.org/2.7/library/unittest.html [2]: https://docs.python.org/3.4/library/unittest.html Change-Id: I2dae60fe786a99344fc12dd4aeaea9c79c9811c5
diff --git a/manila_tempest_tests/tests/api/admin/test_multi_backend.py b/manila_tempest_tests/tests/api/admin/test_multi_backend.py index 8aeabc3..79c9c19 100644 --- a/manila_tempest_tests/tests/api/admin/test_multi_backend.py +++ b/manila_tempest_tests/tests/api/admin/test_multi_backend.py
@@ -61,7 +61,7 @@ # Share's 'host' should be like "hostname@backend_name" for share in self.shares: get = self.shares_client.get_share(share['id']) - self.assertTrue(len(get["host"].split("@")) == 2) + self.assertEqual(2, len(get["host"].split("@"))) @tc.attr(base.TAG_POSITIVE, base.TAG_API_WITH_BACKEND) def test_share_share_type(self):