summaryrefslogtreecommitdiff
path: root/openstackclient
diff options
context:
space:
mode:
authorSteve Martinelli <stevemar@ca.ibm.com>2014-07-25 01:16:01 -0400
committerSteve Martinelli <stevemar@ca.ibm.com>2014-07-25 01:16:01 -0400
commit6e1fa8b27df4f0697f3f44f710469792358e6c50 (patch)
tree924db6baf38193fbf72adaf2448e60344f7d9867 /openstackclient
parent4d3d287dd7e3032c8da2482f28f27dd766c66a23 (diff)
downloadpython-openstackclient-6e1fa8b27df4f0697f3f44f710469792358e6c50.tar.gz
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
Diffstat (limited to 'openstackclient')
-rw-r--r--openstackclient/image/v2/image.py2
-rw-r--r--openstackclient/tests/image/v2/test_image.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/openstackclient/image/v2/image.py b/openstackclient/image/v2/image.py
index 08897b2b..67cb16b6 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 ef84e2c0..9dbdad5c 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