diff options
| author | jiahui.qiang <jiahui.qiang@easystack.cn> | 2017-01-17 02:42:53 +0800 |
|---|---|---|
| committer | jiahui.qiang <jiahui.qiang@easystack.cn> | 2017-01-17 15:19:22 +0800 |
| commit | f353253122ca39aeb092656cea011a06e70103a4 (patch) | |
| tree | 9b6ca87b70dd5412e23e100d4e3a7562d4b7d0a0 /openstackclient/tests/unit/volume | |
| parent | 4d3cfb9142be8884fa74a6a8b324df869e32ba30 (diff) | |
| download | python-openstackclient-f353253122ca39aeb092656cea011a06e70103a4.tar.gz | |
Error in the return of command 'volume qos create'
This patch fixed a 'volume qos create' display mistake in argument
of 'specs'[1]. For command such as:
$ openstack volume qos create hello
[1]https://bugs.launchpad.net/python-openstackclient/+bug/1656767
Closes-bug:#1656767
Change-Id: Ia9fce833d318d9b52b97c12cfb89e2d3c5465fbe
Diffstat (limited to 'openstackclient/tests/unit/volume')
| -rw-r--r-- | openstackclient/tests/unit/volume/v2/test_qos_specs.py | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/openstackclient/tests/unit/volume/v2/test_qos_specs.py b/openstackclient/tests/unit/volume/v2/test_qos_specs.py index 7597e852..35d9a345 100644 --- a/openstackclient/tests/unit/volume/v2/test_qos_specs.py +++ b/openstackclient/tests/unit/volume/v2/test_qos_specs.py @@ -70,24 +70,26 @@ class TestQosAssociate(TestQos): class TestQosCreate(TestQos): - new_qos_spec = volume_fakes.FakeQos.create_one_qos() columns = ( 'consumer', 'id', 'name', - 'specs' - ) - data = ( - new_qos_spec.consumer, - new_qos_spec.id, - new_qos_spec.name, - new_qos_spec.specs + 'properties' ) def setUp(self): super(TestQosCreate, self).setUp() + self.new_qos_spec = volume_fakes.FakeQos.create_one_qos() self.qos_mock.create.return_value = self.new_qos_spec + + self.data = ( + self.new_qos_spec.consumer, + self.new_qos_spec.id, + self.new_qos_spec.name, + utils.format_dict(self.new_qos_spec.specs) + ) + # Get the command object to test self.cmd = qos_specs.CreateQos(self.app, None) @@ -147,11 +149,11 @@ class TestQosCreate(TestQos): columns, data = self.cmd.take_action(parsed_args) - self.new_qos_spec.specs.update( - {'consumer': self.new_qos_spec.consumer}) self.qos_mock.create.assert_called_with( self.new_qos_spec.name, - self.new_qos_spec.specs + {'consumer': self.new_qos_spec.consumer, + 'foo': 'bar', + 'iops': '9001'} ) self.assertEqual(self.columns, columns) @@ -307,7 +309,7 @@ class TestQosList(TestQos): 'Name', 'Consumer', 'Associations', - 'Specs', + 'Properties', ) data = [] for q in qos_specs: @@ -383,7 +385,7 @@ class TestQosShow(TestQos): 'consumer', 'id', 'name', - 'specs' + 'properties' ) data = ( qos_association.name, |
