

@mock.patch.object(shade.OperatorCloud, 'ironic_client')
def test_inspect_machine_fail_active(self, mock_client):
    machine_uuid = '00000000-0000-0000-0000-000000000000'

    class active_machine():
        uuid = machine_uuid
        provision_state = 'active'
    provision_state.node.get.return_value = active_machine
    self.assertRaises(shade.OpenStackCloudException, self.cloud.inspect_machine, machine_uuid, wait=True, timeout=1)

dataset/ETHPy150Open openstack-infra/shade/shade/tests/unit/test_shade_operator.py TestShadeOperator.test_inspect_machine_fail_active/VarMisuse@47/83 `mock_client`->`provision_state`