File size: 592 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
from fastapi.testclient import TestClient
from main import app


client = TestClient(app)


def test_health():
    r = client.get("/health")
    assert r.status_code == 200


def test_cameroon_data_endpoints_exist():
    r1 = client.get("/api/cameroon-data/stats/overview")
    assert r1.status_code in (200, 500)  # 500 if CSV not configured

    r2 = client.get("/api/cameroon-data/patterns/seasonal")
    assert r2.status_code in (200, 500)

    r3 = client.post("/api/cameroon-data/search/similar-cases", json={"query_text": "fever", "top_k": 3})
    assert r3.status_code in (200, 500)