From dfa1e6eec0da81d5eedd303ef32442dc5c2a09d7 Mon Sep 17 00:00:00 2001 From: Rick Harris Date: Wed, 23 Mar 2011 06:26:36 +0000 Subject: More small cleanups --- nova/tests/api/openstack/test_images.py | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/nova/tests/api/openstack/test_images.py b/nova/tests/api/openstack/test_images.py index 2c0c75104..785e104dc 100644 --- a/nova/tests/api/openstack/test_images.py +++ b/nova/tests/api/openstack/test_images.py @@ -50,9 +50,9 @@ class BaseImageServiceTests(object): fixture = self._make_fixture('test image') num_images = len(self.service.index(self.context)) - id = self.service.create(self.context, fixture)['id'] + image_id = self.service.create(self.context, fixture)['id'] - self.assertNotEquals(None, id) + self.assertNotEquals(None, image_id) self.assertEquals(num_images + 1, len(self.service.index(self.context))) @@ -60,10 +60,9 @@ class BaseImageServiceTests(object): fixture = self._make_fixture('test image') num_images = len(self.service.index(self.context)) - id = self.service.create(self.context, fixture)['id'] - - self.assertNotEquals(None, id) + image_id = self.service.create(self.context, fixture)['id'] + self.assertNotEquals(None, image_id) self.assertRaises(exception.NotFound, self.service.show, self.context, @@ -71,12 +70,12 @@ class BaseImageServiceTests(object): def test_update(self): fixture = self._make_fixture('test image') - id = self.service.create(self.context, fixture)['id'] - + image_id = self.service.create(self.context, fixture)['id'] fixture['status'] = 'in progress' - self.service.update(self.context, id, fixture) - new_image_data = self.service.show(self.context, id) + self.service.update(self.context, image_id, fixture) + + new_image_data = self.service.show(self.context, image_id) self.assertEquals('in progress', new_image_data['status']) def test_delete(self): @@ -113,9 +112,7 @@ class BaseImageServiceTests(object): 'updated': None, 'created': None, 'status': None, - 'is_public': True, - 'instance_id': None, - 'progress': None} + 'is_public': True} return fixture -- cgit