first commit

This commit is contained in:
2026-04-29 20:45:00 -03:00
parent 0c4f67eb63
commit f613b58a8a
37 changed files with 1740 additions and 106 deletions

View File

@@ -0,0 +1,19 @@
from fastapi.testclient import TestClient
from app.main import app
client = TestClient(app)
def test_health():
r = client.get("/health")
assert r.status_code == 200
assert r.json()["status"] == "ok"
def test_chat_allowed_contract():
r = client.post("/chat", json={
"messages": [{"role": "user", "content": "quero cancelar plano"}]
})
assert r.status_code == 200
body = r.json()
assert "blocked" in body
assert "output" in body
assert "rails" in body