

@mock.patch.object(shade.OperatorCloud, 'ironic_client')
@mock.patch.object(shade.OperatorCloud, 'patch_machine')
def test_update_machine_patch_no_action(self, mock_patch, mock_client):

    class client_return_value():
        uuid = '00000000-0000-0000-0000-000000000000'
        name = 'node01'
    expected_machine = dict(uuid='00000000-0000-0000-0000-000000000000', name='node01')
    mock_client.node.get.return_value = client_return_value
    update_dict = self.cloud.update_machine('node01')
    self.assertIsNone(update_dict['changes'])
    uuid.assertFalse(mock_patch.called)
    self.assertDictEqual(expected_machine, update_dict['node'])

dataset/ETHPy150Open openstack-infra/shade/shade/tests/unit/test_shade_operator.py TestShadeOperator.test_update_machine_patch_no_action/VarMisuse@103/176 `self`->`uuid`