

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

    class manageable_machine():
        uuid = machine_uuid
        provision_state = 'manageable'
    mock_client.node.get.return_value = manageable_machine
    self.cloud.inspect_machine(machine_uuid)
    mock_client.assertEqual(mock_client.node.set_provision_state.call_count, 1)

dataset/ETHPy150Open openstack-infra/shade/shade/tests/unit/test_shade_operator.py TestShadeOperator.test_inspect_machine_managable/VarMisuse@66/113 `self`->`mock_client`