Fixes incorrect assertion check
assertNotIn/assertIn does not work if the second
variable is of type List of dictionaries.
Suppose if it of only dictionary type, it will try
to match only 'key' but not 'value'.
Hence, the assertion check done here is not correct.
This patch fixes an incorrect assertion check for
"BasicOperationsImagesTest.test_delete_image" test
Change-Id: I7058d209cc92a2e381308e59e07d180e84bde182
Closes-Bug: #1346757
diff --git a/tempest/api/image/v2/test_images.py b/tempest/api/image/v2/test_images.py
index ae777eb..4226815 100644
--- a/tempest/api/image/v2/test_images.py
+++ b/tempest/api/image/v2/test_images.py
@@ -86,7 +86,8 @@
# Verifying deletion
_, images = self.client.image_list()
- self.assertNotIn(image_id, images)
+ images_id = [item['id'] for item in images]
+ self.assertNotIn(image_id, images_id)
@test.attr(type='gate')
def test_update_image(self):