diff options
| author | Benoît Knecht <benoit.knecht@fsfe.org> | 2018-07-17 14:13:39 +0200 |
|---|---|---|
| committer | Benoît Knecht <benoit.knecht@fsfe.org> | 2018-07-20 10:37:34 +0200 |
| commit | fc76db0def66df5bbbc1dc67231b11a531d279fc (patch) | |
| tree | 71a892d56bf2e0d95aaf6ef341504a72591a1ea7 /openstackclient/tests/unit/compute | |
| parent | ee35409069b0f77984e912cfc0c90cb9cce52512 (diff) | |
| download | python-openstackclient-fc76db0def66df5bbbc1dc67231b11a531d279fc.tar.gz | |
compute: host: expand kwargs in host_set() call
`host_set()` expects `status` and `maintenance_mode` as keyword
arguments, but in `SetHost.take_action()`, it is called without
expanding the keyword arguments.
So it's called as
```
host_set(host, {'status': 'enable'})
```
instead of
```
host_set(host, status='enable')
```
Change-Id: If0b37ac60091161a892bfc694fce31a988f66005
Task: 23023
Diffstat (limited to 'openstackclient/tests/unit/compute')
| -rw-r--r-- | openstackclient/tests/unit/compute/v2/test_host.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/openstackclient/tests/unit/compute/v2/test_host.py b/openstackclient/tests/unit/compute/v2/test_host.py index 329095de..244da413 100644 --- a/openstackclient/tests/unit/compute/v2/test_host.py +++ b/openstackclient/tests/unit/compute/v2/test_host.py @@ -111,8 +111,7 @@ class TestHostSet(TestHost): result = self.cmd.take_action(parsed_args) self.assertIsNone(result) - body = {} - h_mock.assert_called_with(self.host['host'], body) + h_mock.assert_called_with(self.host['host']) def test_host_set(self, h_mock): h_mock.return_value = self.host @@ -133,8 +132,8 @@ class TestHostSet(TestHost): result = self.cmd.take_action(parsed_args) self.assertIsNone(result) - body = {'status': 'enable', 'maintenance_mode': 'disable'} - h_mock.assert_called_with(self.host['host'], body) + h_mock.assert_called_with(self.host['host'], status='enable', + maintenance_mode='disable') @mock.patch( |
