From 5cc6fc2b88296035f687f72d92efe4a3cea78fc7 Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Wed, 5 May 2021 16:59:14 +0300 Subject: Allow to filter multiple tags for image list Currently in case of passing `--tag` several times, only last one will be picked up for the filtering. In the meanwhile Glance allow option to be repeated multiple times to filter based on the multiple tags. Depends-On: https://review.opendev.org/c/openstack/openstacksdk/+/789827 Change-Id: I7379d0b0014f0e3d13b02ee5ec6b642a7a5aa7d1 --- openstackclient/tests/unit/image/v2/test_image.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'openstackclient/tests/unit') diff --git a/openstackclient/tests/unit/image/v2/test_image.py b/openstackclient/tests/unit/image/v2/test_image.py index 7ccc9f0f..d563bf50 100644 --- a/openstackclient/tests/unit/image/v2/test_image.py +++ b/openstackclient/tests/unit/image/v2/test_image.py @@ -835,15 +835,16 @@ class TestImageList(TestImage): def test_image_list_tag_option(self): arglist = [ '--tag', 'abc', + '--tag', 'cba' ] verifylist = [ - ('tag', 'abc'), + ('tag', ['abc', 'cba']), ] parsed_args = self.check_parser(self.cmd, arglist, verifylist) columns, data = self.cmd.take_action(parsed_args) self.client.images.assert_called_with( - tag='abc' + tag=['abc', 'cba'] ) -- cgit v1.2.1