diff options
| author | zhiyong.dai <zhiyong.dai@easystack.cn> | 2016-12-01 02:20:23 +0800 |
|---|---|---|
| committer | zhiyong.dai <zhiyong.dai@easystack.cn> | 2017-02-23 21:49:11 +0800 |
| commit | 40ec7a9c96f4ce4071e47e5bf0c249aa77b5b2ee (patch) | |
| tree | fa08254e4e9c9bc5c2b0ca12881feffad713ec68 /openstackclient/tests/unit/volume/v1/test_volume.py | |
| parent | 3b562ffa904ebb23396c2d6c7398a520cd535238 (diff) | |
| download | python-openstackclient-40ec7a9c96f4ce4071e47e5bf0c249aa77b5b2ee.tar.gz | |
Support --no-property in "volume set" command
Add "--no-property" option to "volume set" command in v1 and v2
and update the test cases.
Change-Id: Id5660f23b3b2d9aa72f4c16b19ce83f3f7ed2fa4
Diffstat (limited to 'openstackclient/tests/unit/volume/v1/test_volume.py')
| -rw-r--r-- | openstackclient/tests/unit/volume/v1/test_volume.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/openstackclient/tests/unit/volume/v1/test_volume.py b/openstackclient/tests/unit/volume/v1/test_volume.py index 6c6d9a1d..d46a7ba9 100644 --- a/openstackclient/tests/unit/volume/v1/test_volume.py +++ b/openstackclient/tests/unit/volume/v1/test_volume.py @@ -1071,6 +1071,7 @@ class TestVolumeSet(TestVolume): def test_volume_set_property(self): arglist = [ + '--no-property', '--property', 'myprop=myvalue', self._volume.display_name, ] @@ -1080,6 +1081,7 @@ class TestVolumeSet(TestVolume): ('name', None), ('description', None), ('size', None), + ('no_property', True), ('property', {'myprop': 'myvalue'}), ('volume', self._volume.display_name), ('bootable', False), @@ -1097,6 +1099,10 @@ class TestVolumeSet(TestVolume): self._volume.id, metadata ) + self.volumes_mock.delete_metadata.assert_called_with( + self._volume.id, + self._volume.metadata.keys() + ) self.volumes_mock.update_readonly_flag.assert_not_called() self.assertIsNone(result) |
