Merge "compute: host: expand kwargs in host_set() call"

This commit is contained in:
Zuul 2018-07-25 00:52:39 +00:00 committed by Gerrit Code Review
commit e78a2e7b09
2 changed files with 4 additions and 5 deletions

View File

@ -97,7 +97,7 @@ class SetHost(command.Command):
compute_client.api.host_set(
parsed_args.host,
kwargs
**kwargs
)

View File

@ -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(