Added tests/ for CI.
Some checks failed
CI / Lint & Format (push) Has been cancelled
CI / Tests (Pytest + Alembic + Postgres) (push) Has been cancelled
CI / Docker Build (push) Has been cancelled

This commit is contained in:
2025-09-22 20:23:26 +01:00
parent 8c53c2ffaa
commit 262de452e4
3 changed files with 27 additions and 8 deletions

11
tests/test-health.py Normal file
View File

@@ -0,0 +1,11 @@
#
# Tiny test to pass CI, just checks the health endpoint to ensure API running.
#
from fastapi.testclient import TestClient
from app.main import app
def test_healthz():
client = TestClient(app)
r = client.get("/healthz")
assert r.status_code == 200
assert r.json() == {"ok": True}

View File

@@ -0,0 +1,7 @@
#
# 2nd tiny test to pass CI, just ensures package installs and models import OK.
#
def test_models_import():
from app.db.base import Base # noqa: F401
from app.models.user import User # noqa: F401
assert True