from fastapi.testclient import TestClient from app.main import app client = TestClient(app) def test_web_ping(): response = client.get("/ping") assert response.status_code == 200 assert response.text == '"pong"' def test_api_ping(): response = client.get("/api/v1/ping") assert response.status_code == 200 body = response.json() assert body["status"] == "OK" assert body["message"] == "pong"