diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c4922fc..cd4001c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -205,8 +205,8 @@ test-subscription-api: - docker compose -f subscription-domain/docker-compose.yml --env-file $ENV_DEV_FILE down - docker compose -f subscription-domain/docker-compose.yml --env-file $ENV_DEV_FILE pull - docker compose -f subscription-domain/docker-compose.yml --env-file $ENV_DEV_FILE up --abort-on-container-exit --renew-anon-volumes - - docker cp fids_subscription_api:/usr/src/app/coverage.xml . - - docker cp fids_subscription_api:/usr/src/app/report.xml . + - docker cp fids_subscriptions_api:/usr/src/app/coverage.xml . + - docker cp fids_subscriptions_api:/usr/src/app/report.xml . artifacts: when: always paths: diff --git a/flights-domain/flights-information/src/tests/functional/flights_functional_test.py b/flights-domain/flights-information/src/tests/functional/flights_functional_test.py index 68ec8ae..6e8e3e9 100644 --- a/flights-domain/flights-information/src/tests/functional/flights_functional_test.py +++ b/flights-domain/flights-information/src/tests/functional/flights_functional_test.py @@ -1,6 +1,7 @@ import json from datetime import datetime +from fastapi import BackgroundTasks from fastapi.testclient import TestClient from src.api.main import app @@ -33,7 +34,13 @@ def test_post_flight(test_database, get_flight): assert db_retrieved_flight.flight_code == creating_flight["flight_code"] -def test_patch_flight(test_database, create_flight, flight_to_create): +def add_task(self, func, *args, **kwargs) -> None: + return None + + +def test_patch_flight(test_database, create_flight, flight_to_create, monkeypatch): + monkeypatch.setattr(BackgroundTasks, "add_task", add_task) + test_database.query(Flight).delete() created_flight = create_flight(flight_to_create) api_call_retrieved_flight = client.patch(