

@mock.patch.object(shade.OperatorCloud, 'ironic_client')
@mock.patch.object(shade._utils, '_iterate_timeout')
def test_deactivate_node(self, mock_timeout, mock_client):
    mock_client.node.set_provision_state.return_value = None
    node_id = 'node03'
    return_value = self.cloud.deactivate_node(node_id, wait=False)
    self.assertEqual(None, return_value)
    mock_client.node.set_provision_state.assert_called_with(node_uuid='node03', state='deleted', configdrive=None)
    self.assertFalse(mock_timeout.called)

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