

@mock.patch.object(shade.OperatorCloud, 'ironic_client')
def test_set_machine_maintenace_state(self, mock_client):
    mock_client.node.set_maintenance.return_value = None
    node_id = 'node01'
    reason = 'no reason'
    self.cloud.set_machine_maintenance_state(reason, True, reason=reason)
    mock_client.node.set_maintenance.assert_called_with(node_id='node01', state='true', maint_reason='no reason')

dataset/ETHPy150Open openstack-infra/shade/shade/tests/unit/test_shade_operator.py TestShadeOperator.test_set_machine_maintenace_state/VarMisuse@50/87 `node_id`->`reason`