Exemple #1
0
def test_delete_request(das_api, client, mock_req_store, req_store_get):
    das_api.request_management_res._org_checker = MagicMock()

    response = client.delete(GET_REQUEST_PATH.format(req_id=TEST_ACQUISITION_REQ.id))

    assert response.status == falcon.HTTP_200
    mock_req_store.delete.assert_called_with(TEST_ACQUISITION_REQ)
Exemple #2
0
def test_delete_request(das_api, client, mock_req_store, req_store_get):
    das_api.request_management_res._org_checker = MagicMock()

    response = client.delete(
        GET_REQUEST_PATH.format(req_id=TEST_ACQUISITION_REQ.id))

    assert response.status == falcon.HTTP_200
    mock_req_store.delete.assert_called_with(TEST_ACQUISITION_REQ)
Exemple #3
0
def test_delete_request_not_found(client, mock_req_store):
    mock_req_store.get.side_effect = RequestNotFoundError()
    response = client.delete(GET_REQUEST_PATH.format(req_id='fake-id'))
    assert response.status == falcon.HTTP_404
Exemple #4
0
def test_delete_request_not_found(client, mock_req_store):
    mock_req_store.get.side_effect = RequestNotFoundError()
    response = client.delete(GET_REQUEST_PATH.format(req_id='fake-id'))
    assert response.status == falcon.HTTP_404