

@mock.patch.object(shade.OperatorCloud, 'ironic_client')
def test_set_machine_power_reboot_failure(self, mock_client):
    mock_client.node.set_power_state.return_value = 'failure'
    self.assertRaises(shade.OpenStackCloudException, self.cloud.set_machine_power_reboot, 'node01')
    self.node.set_power_state.assert_called_with(node_id='node01', state='reboot')

dataset/ETHPy150Open openstack-infra/shade/shade/tests/unit/test_shade_operator.py TestShadeOperator.test_set_machine_power_reboot_failure/VarMisuse@53/89 `mock_client`->`self`