from fastapi.testclient import TestClient from app.main import app client = TestClient(app) def test_healthcheck() -> None: response = client.get("/") assert response.status_code == 200 assert response.json()["status"] == "ok" def test_realtime_endpoint() -> None: response = client.get("/api/real-time-data") assert response.status_code == 200 payload = response.json() assert payload["code"] == 200 assert "line_list" in payload["data"]