diff options
author | Zuul <zuul@review.opendev.org> | 2023-05-17 23:20:28 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2023-05-17 23:20:28 +0000 |
commit | 4a62c7399210dd2f23aba4df000c17f1dab03817 (patch) | |
tree | 4e065411c863334bc53ab31cf2284f9e9c494c39 /openstackclient/tests/unit/volume/v1/test_qos_specs.py | |
parent | d0a17d48a9972a572f22cc6f73525ec8a87c44ef (diff) | |
parent | 629eb33c4dcb73d44d1a4c6105e40d28f6cebdfc (diff) | |
download | python-openstackclient-master.tar.gz |
Diffstat (limited to 'openstackclient/tests/unit/volume/v1/test_qos_specs.py')
-rw-r--r-- | openstackclient/tests/unit/volume/v1/test_qos_specs.py | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/openstackclient/tests/unit/volume/v1/test_qos_specs.py b/openstackclient/tests/unit/volume/v1/test_qos_specs.py index 7e26e223..cbfd1fa4 100644 --- a/openstackclient/tests/unit/volume/v1/test_qos_specs.py +++ b/openstackclient/tests/unit/volume/v1/test_qos_specs.py @@ -366,22 +366,30 @@ class TestQosSet(TestQos): def test_qos_set_with_properties_with_id(self): arglist = [ + '--no-property', '--property', - 'foo=bar', + 'a=b', '--property', - 'iops=9001', + 'c=d', self.qos_spec.id, ] + new_property = {"a": "b", "c": "d"} verifylist = [ - ('property', self.qos_spec.specs), + ('no_property', True), + ('property', new_property), ('qos_spec', self.qos_spec.id), ] parsed_args = self.check_parser(self.cmd, arglist, verifylist) result = self.cmd.take_action(parsed_args) + self.qos_mock.unset_keys.assert_called_with( + self.qos_spec.id, + list(self.qos_spec.specs.keys()), + ) self.qos_mock.set_keys.assert_called_with( - self.qos_spec.id, self.qos_spec.specs + self.qos_spec.id, + {"a": "b", "c": "d"}, ) self.assertIsNone(result) |