Spaces:
Runtime error
Runtime error
cdupland
Add FastAPI application structure with Prisma integration, including API endpoints, services, repositories, and database setup. Introduce strict layering rules, documentation, and testing strategy.
0ddf928 |
Download docs/testing.md from mlcl-trading/afp-backend: direct link, hf CLI and curl.
- Browser
- Download file 554 Bytes
-
https://huggingface.co/spaces/mlcl-trading/afp-backend/resolve/main/docs/testing.md
- Command line
-
hf download hf://spaces/mlcl-trading/afp-backend/docs/testing.md
-
curl -L -o testing.md https://huggingface.co/spaces/mlcl-trading/afp-backend/resolve/main/docs/testing.md
554 Bytes
Testing strategy
Test levels
tests/unit: pure business logic, mocks only.tests/integration: Prisma repositories against local Supabase DB.tests/e2e: full HTTP flow via FastAPI app.
Markers
@pytest.mark.unit@pytest.mark.integration@pytest.mark.e2e
Commands
pytest -m unit
pytest -m integration
pytest -m e2e
pytest -m "not integration"
Fixtures
prisma: shared Prisma connection for tests.app: FastAPI app with DB dependency override.client: HTTPX async client bound to ASGI app.