From 57cbac057028537fca5af4ed8ffaea4be67e8c64 Mon Sep 17 00:00:00 2001 From: Justin Shepherd Date: Wed, 24 Aug 2011 09:29:58 -0500 Subject: [PATCH] Bug lp:829654 Assert was not actually validating return data from api query. Change-Id: I2db2863c749bfabba201ae2d733330b7a71bef2d --- glance/tests/functional/test_api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/glance/tests/functional/test_api.py b/glance/tests/functional/test_api.py index 29df5f7647..ed8431c0eb 100644 --- a/glance/tests/functional/test_api.py +++ b/glance/tests/functional/test_api.py @@ -194,7 +194,7 @@ def test_get_head_simple_post(self): image = json.loads(content) for expected_key, expected_value in expected_image.items(): - self.assertEqual(expected_value, expected_image[expected_key], + self.assertEqual(expected_value, image['images'][0][expected_key], "For key '%s' expected header value '%s'. Got '%s'" % (expected_key, expected_value, @@ -235,7 +235,7 @@ def test_get_head_simple_post(self): image = json.loads(content) for expected_key, expected_value in expected_image.items(): - self.assertEqual(expected_value, expected_image[expected_key], + self.assertEqual(expected_value, image['images'][0][expected_key], "For key '%s' expected header value '%s'. Got '%s'" % (expected_key, expected_value,