Skip to content

Commit 6e1fa8b

Browse files
author
Steve Martinelli
committed
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
1 parent 4d3d287 commit 6e1fa8b

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎openstackclient/image/v2/image.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def take_action(self, parsed_args):
4848
image_client.images,
4949
parsed_args.image,
5050
)
51-
image_client.images.delete(image)
51+
image_client.images.delete(image.id)
5252

5353

5454
class ListImage(lister.Lister):

‎openstackclient/tests/image/v2/test_image.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
import copy
1717

18-
from openstackclient.image.v1 import image
18+
from openstackclient.image.v2 import image
1919
from openstackclient.tests import fakes
2020
from openstackclient.tests.image.v2 import fakes as image_fakes
2121

0 commit comments

Comments
 (0)