- pyproject.toml con FastAPI, SQLAlchemy 2.x, Alembic, Pydantic v2, openpyxl, rapidfuzz, Faker; dev: pytest, httpx, ruff - app/: config desde entorno, engine SQLite con WAL y sesión sin borrado físico, stubs por fase - seed/ y tests/fixtures/ con README; .gitignore excluye *.xlsx fuera de seed/ y tests/fixtures/ - test de /api/health con cliente de prueba y SQLite en memoria
10 lines
284 B
Python
10 lines
284 B
Python
from fastapi.testclient import TestClient
|
|
|
|
from app import __version__
|
|
|
|
|
|
def test_health_responde_ok(client: TestClient) -> None:
|
|
respuesta = client.get("/api/health")
|
|
assert respuesta.status_code == 200
|
|
assert respuesta.json() == {"status": "ok", "version": __version__}
|