Fix incorrect use of assertFalse causing CI failed

assertFalse should not be used with non-boolean args.

Change-Id: I65340b8538104a84b45c0be39d0e0baa4c7c433c
This commit is contained in:
Dao Cong Tien 2017-10-26 09:16:57 +07:00
parent 1ef89a58cd
commit 5a26e4e5b0
4 changed files with 18 additions and 18 deletions

View File

@ -167,5 +167,5 @@ class GroupReplicationTest(functional_helpers._FunctionalTestBase):
found_group = self._poll_group_while(created_group_id, ['deleting'])
# Should be gone
self.assertFalse(found_volume)
self.assertFalse(found_group)
self.assertIsNone(found_volume)
self.assertIsNone(found_group)

View File

@ -118,9 +118,9 @@ class GroupSnapshotsTest(functional_helpers._FunctionalTestBase):
found_group = self._poll_group_while(created_group_id, ['deleting'])
# Should be gone
self.assertFalse(found_group_snapshot)
self.assertFalse(found_volume)
self.assertFalse(found_group)
self.assertIsNone(found_group_snapshot)
self.assertIsNone(found_volume)
self.assertIsNone(found_group)
def test_create_group_from_group_snapshot(self):
"""Creates a group from a group snapshot."""
@ -218,10 +218,10 @@ class GroupSnapshotsTest(functional_helpers._FunctionalTestBase):
found_group = self._poll_group_while(created_group_id, ['deleting'])
# Should be gone
self.assertFalse(found_group_from_snap)
self.assertFalse(found_group_snapshot)
self.assertFalse(found_volume)
self.assertFalse(found_group)
self.assertIsNone(found_group_from_snap)
self.assertIsNone(found_group_snapshot)
self.assertIsNone(found_volume)
self.assertIsNone(found_group)
def test_create_group_from_source_group(self):
"""Creates a group from a source group."""
@ -298,9 +298,9 @@ class GroupSnapshotsTest(functional_helpers._FunctionalTestBase):
found_group = self._poll_group_while(created_group_id, ['deleting'])
# Should be gone
self.assertFalse(found_group_from_group)
self.assertFalse(found_volume)
self.assertFalse(found_group)
self.assertIsNone(found_group_from_group)
self.assertIsNone(found_volume)
self.assertIsNone(found_group)
def test_reset_group_snapshot(self):
# Create group
@ -352,6 +352,6 @@ class GroupSnapshotsTest(functional_helpers._FunctionalTestBase):
found_group = self._poll_group_while(group_id, ['deleting'])
# Created resources should be gone
self.assertFalse(found_group_snapshot)
self.assertFalse(found_volume)
self.assertFalse(found_group)
self.assertIsNone(found_group_snapshot)
self.assertIsNone(found_volume)
self.assertIsNone(found_group)

View File

@ -109,5 +109,5 @@ class GroupsTest(functional_helpers._FunctionalTestBase):
found_group = self._poll_group_while(created_group_id, ['deleting'])
# Should be gone
self.assertFalse(found_volume)
self.assertFalse(found_group)
self.assertIsNone(found_volume)
self.assertIsNone(found_group)

View File

@ -75,7 +75,7 @@ class VolumesTest(functional_helpers._FunctionalTestBase):
found_volume = self._poll_volume_while(created_volume_id, ['deleting'])
# Should be gone
self.assertFalse(found_volume)
self.assertIsNone(found_volume)
def test_create_volume_with_metadata(self):
"""Creates a volume with metadata."""