Added tests/ for CI.
This commit is contained in:
11
tests/test-health.py
Normal file
11
tests/test-health.py
Normal 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}
|
7
tests/test-model-import.py
Normal file
7
tests/test-model-import.py
Normal 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
|
Reference in New Issue
Block a user