summaryrefslogtreecommitdiff
path: root/openstackclient/tests/unit/volume/v1/test_qos_specs.py
diff options
context:
space:
mode:
Diffstat (limited to 'openstackclient/tests/unit/volume/v1/test_qos_specs.py')
-rw-r--r--openstackclient/tests/unit/volume/v1/test_qos_specs.py16
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)