diff --git a/openstackclient/compute/v2/host.py b/openstackclient/compute/v2/host.py index 9fdfd927d0..07c92a8c16 100644 --- a/openstackclient/compute/v2/host.py +++ b/openstackclient/compute/v2/host.py @@ -97,7 +97,7 @@ class SetHost(command.Command): compute_client.api.host_set( parsed_args.host, - kwargs + **kwargs ) diff --git a/openstackclient/tests/unit/compute/v2/test_host.py b/openstackclient/tests/unit/compute/v2/test_host.py index 329095deef..244da41317 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(