from fastapi.testclient import TestClient from app.api import create_router from app.config import Settings from app.main import app def test_health_contract(): response = TestClient(app).get("/health") assert response.status_code == 200 assert response.json()["service"] == "Faiq AI" def test_models_contract(): response = TestClient(app).get("/v1/models") assert response.status_code == 200 assert [item["id"] for item in response.json()["models"]] == ["faiq", "danish"] def test_stream_is_explicitly_unimplemented(monkeypatch): response = TestClient(app).post("/v1/chat/completions", json={"messages":[{"role":"user","content":"hi"}],"stream":True}) assert response.status_code == 501