File size: 387 Bytes
24a5e7e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import pytest
from fastapi.testclient import TestClient

from main import app


client = TestClient(app)


def test_health_endpoint_ok():
    resp = client.get("/health")
    assert resp.status_code == 200
    data = resp.json()
    assert "status" in data
    assert isinstance(data["status"], str)
    assert "models_loaded" in data
    assert isinstance(data["models_loaded"], list)