

@mock.patch.object(shade.OperatorCloud, 'ironic_client')
@mock.patch.object(shade._utils, '_iterate_timeout')
def test_activate_node(self, mock_timeout, mock_client):
    mock_client.node.set_provision_state.return_value = None
    node_id = 'node02'
    return_value = self.cloud.activate_node(node_id, configdrive='http://127.0.0.1/file.iso')
    self.assertEqual(None, return_value)
    mock_client.node.set_provision_state.assert_called_with(node_uuid='node02', state='active', configdrive='http://127.0.0.1/file.iso')
    self.assertFalse(mock_timeout.called)

dataset/ETHPy150Open openstack-infra/shade/shade/tests/unit/test_shade_operator.py TestShadeOperator.test_activate_node/original