branchforge / tests /test_api.py
SSHdotCodes
Build BranchForge evidence-first coding agent
85f36c8
Raw
History Blame Contribute Delete
453 Bytes
from fastapi.testclient import TestClient
from app.main import app
client = TestClient(app)
def test_health() -> None:
response = client.get("/api/health")
assert response.status_code == 200
assert response.json()["ok"] is True
def test_home_and_sample() -> None:
assert client.get("/").status_code == 200
sample = client.get("/api/sample")
assert sample.status_code == 200
assert "half-cent" in sample.json()["issue"]