Add multi deletion testcase for "openstack image delete"

Change-Id: I5442128a290a9ad3b9ff9919431a1ecc0c697dad
Implements: blueprint improve-image-unittest-framework
This commit is contained in:
xiexs 2015-12-09 17:58:07 +08:00
parent d377756a62
commit 50e52f355f

View File

@ -347,6 +347,22 @@ class TestImageDelete(TestImage):
images[0].id,
)
def test_image_delete_multi_images(self):
images = self.setup_images_mock(count=3)
arglist = [i.id for i in images]
verifylist = [
('images', arglist),
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
self.cmd.take_action(parsed_args)
calls = [mock.call(i.id) for i in images]
self.images_mock.delete.assert_has_calls(calls)
class TestImageList(TestImage):