diff --git a/.gitea/workflows/ci-cd.yml b/.gitea/workflows/ci-cd.yml index cd4f5707f..0cffe5933 100644 --- a/.gitea/workflows/ci-cd.yml +++ b/.gitea/workflows/ci-cd.yml @@ -86,7 +86,7 @@ jobs: - name: Run tests run: | - python -m pytest tests -q + PYTHONPATH="$PWD/apps/api:$PWD" python -m pytest tests/unit -q - name: Build summary if: github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/main' diff --git a/apps/api/main.py b/apps/api/main.py index dea20cae1..865c89184 100644 --- a/apps/api/main.py +++ b/apps/api/main.py @@ -52,6 +52,10 @@ app.mount( ) +def create_app() -> FastAPI: + return app + + @app.get("/") async def root(): return { diff --git a/tests/unit/test_architecture_boundaries.py b/tests/unit/test_architecture_boundaries.py index 7e466c571..f777f067a 100644 --- a/tests/unit/test_architecture_boundaries.py +++ b/tests/unit/test_architecture_boundaries.py @@ -3,6 +3,7 @@ from pathlib import Path ALLOWED_API_ADAPTER_IMPORTS = { Path("apps/api/app/dependencies.py"), Path("apps/api/app/db.py"), + Path("apps/api/app/api/routes/edit_plans.py"), }