Merge "compute: host: expand kwargs in host_set() call"
This commit is contained in:
commit
e78a2e7b09
@ -97,7 +97,7 @@ class SetHost(command.Command):
|
|||||||
|
|
||||||
compute_client.api.host_set(
|
compute_client.api.host_set(
|
||||||
parsed_args.host,
|
parsed_args.host,
|
||||||
kwargs
|
**kwargs
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -111,8 +111,7 @@ class TestHostSet(TestHost):
|
|||||||
result = self.cmd.take_action(parsed_args)
|
result = self.cmd.take_action(parsed_args)
|
||||||
self.assertIsNone(result)
|
self.assertIsNone(result)
|
||||||
|
|
||||||
body = {}
|
h_mock.assert_called_with(self.host['host'])
|
||||||
h_mock.assert_called_with(self.host['host'], body)
|
|
||||||
|
|
||||||
def test_host_set(self, h_mock):
|
def test_host_set(self, h_mock):
|
||||||
h_mock.return_value = self.host
|
h_mock.return_value = self.host
|
||||||
@ -133,8 +132,8 @@ class TestHostSet(TestHost):
|
|||||||
result = self.cmd.take_action(parsed_args)
|
result = self.cmd.take_action(parsed_args)
|
||||||
self.assertIsNone(result)
|
self.assertIsNone(result)
|
||||||
|
|
||||||
body = {'status': 'enable', 'maintenance_mode': 'disable'}
|
h_mock.assert_called_with(self.host['host'], status='enable',
|
||||||
h_mock.assert_called_with(self.host['host'], body)
|
maintenance_mode='disable')
|
||||||
|
|
||||||
|
|
||||||
@mock.patch(
|
@mock.patch(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user