From 6e1fa8b27df4f0697f3f44f710469792358e6c50 Mon Sep 17 00:00:00 2001 From: Steve Martinelli <stevemar@ca.ibm.com> Date: Fri, 25 Jul 2014 01:16:01 -0400 Subject: [PATCH] Change V2 image tests to actually run V2 image code The current tests for image do not run v2 image code, changing that portion also made it's only test fail. I opted to change the image delete code and not the test, since passing the object ID is more in line with the rest of the project code. Change-Id: I62e13c063a5d68279dbbf31e59266db6285d73bf --- openstackclient/image/v2/image.py | 2 +- openstackclient/tests/image/v2/test_image.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/openstackclient/image/v2/image.py b/openstackclient/image/v2/image.py index 08897b2bbf..67cb16b697 100644 --- a/openstackclient/image/v2/image.py +++ b/openstackclient/image/v2/image.py @@ -48,7 +48,7 @@ class DeleteImage(command.Command): image_client.images, parsed_args.image, ) - image_client.images.delete(image) + image_client.images.delete(image.id) class ListImage(lister.Lister): diff --git a/openstackclient/tests/image/v2/test_image.py b/openstackclient/tests/image/v2/test_image.py index ef84e2c04e..9dbdad5cbc 100644 --- a/openstackclient/tests/image/v2/test_image.py +++ b/openstackclient/tests/image/v2/test_image.py @@ -15,7 +15,7 @@ import copy -from openstackclient.image.v1 import image +from openstackclient.image.v2 import image from openstackclient.tests import fakes from openstackclient.tests.image.v2 import fakes as image_fakes