2026-03-23 14:07:34 +03:00
|
|
|
from fastapi.testclient import TestClient
|
|
|
|
|
|
|
|
|
|
from api.main import app
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
client = TestClient(app)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_health() -> None:
|
|
|
|
|
resp = client.get("/health")
|
|
|
|
|
assert resp.status_code == 200
|
|
|
|
|
assert resp.json() == {"status": "ok"}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_root() -> None:
|
|
|
|
|
resp = client.get("/")
|
|
|
|
|
assert resp.status_code == 200
|
|
|
|
|
assert resp.json() == {"message": "FastAPI is running"}
|
|
|
|
|
|
2026-03-23 14:11:08 +03:00
|
|
|
|
2026-03-24 11:38:09 +03:00
|
|
|
# def test_checker() -> None:
|
|
|
|
|
# a = 1
|
|
|
|
|
# assert a == 2
|
2026-03-23 14:11:08 +03:00
|
|
|
|