File size: 568 Bytes
411a994
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
from fastapi.testclient import TestClient
from main import app


client = TestClient(app)


def test_unified_chat_text():
    r = client.post("/api/chat/unified", json={
        "message": "J'ai de la fièvre et des frissons",
        "message_type": "text",
        "language": "fr"
    })
    assert r.status_code in (200, 500)
    if r.status_code == 200:
        data = r.json()
        assert "response" in data and "context" in data


def test_cameroon_overview():
    r = client.get("/api/cameroon-data/stats/overview")
    assert r.status_code in (200, 500)