diff options
| author | sunyajing <yajing.sun@easystack.cn> | 2016-06-14 15:44:41 +0800 |
|---|---|---|
| committer | Steve Martinelli <s.martinelli@gmail.com> | 2016-06-17 04:20:28 +0000 |
| commit | 8a12a39ece3882af56b42898ffee0d537c96edc8 (patch) | |
| tree | 035553e001193a212fb55d51877585371cd3d16e /openstackclient/tests/image | |
| parent | 2c92b60f457a16c315b6286592e9fee534bd4b3d (diff) | |
| download | python-openstackclient-8a12a39ece3882af56b42898ffee0d537c96edc8.tar.gz | |
Make set/unset command in identity and image pass normally when nothing specified
Also update its unit tests.
Change-Id: I82b90658b0d4247cdc9a650f14aceda640a32059
Partial-bug: #1588588
Diffstat (limited to 'openstackclient/tests/image')
| -rw-r--r-- | openstackclient/tests/image/v2/test_image.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/openstackclient/tests/image/v2/test_image.py b/openstackclient/tests/image/v2/test_image.py index 92e0660f..3dbf504a 100644 --- a/openstackclient/tests/image/v2/test_image.py +++ b/openstackclient/tests/image/v2/test_image.py @@ -811,6 +811,19 @@ class TestImageSet(TestImage): # Get the command object to test self.cmd = image.SetImage(self.app, None) + def test_image_set_no_options(self): + arglist = [ + image_fakes.image_id, + ] + verifylist = [ + ('image', image_fakes.image_id) + ] + parsed_args = self.check_parser(self.cmd, arglist, verifylist) + + result = self.cmd.take_action(parsed_args) + + self.assertIsNone(result) + def test_image_set_options(self): arglist = [ '--name', 'new-name', @@ -1211,6 +1224,19 @@ class TestImageUnset(TestImage): # Get the command object to test self.cmd = image.UnsetImage(self.app, None) + def test_image_unset_no_options(self): + arglist = [ + image_fakes.image_id, + ] + verifylist = [ + ('image', image_fakes.image_id) + ] + parsed_args = self.check_parser(self.cmd, arglist, verifylist) + + result = self.cmd.take_action(parsed_args) + + self.assertIsNone(result) + def test_image_unset_tag_option(self): arglist = [ |
