Ragcore / tests /test_api.py
NinjainPJs's picture
Initial deploy: RagCore RAG system with hybrid search and Gradio UI
a34068e
raw
history blame contribute delete
522 Bytes
from fastapi.testclient import TestClient
from app.main import app
client = TestClient(app)
def test_health():
response = client.get("/health")
assert response.status_code == 200
data = response.json()
assert data["status"] == "ok"
assert "components" in data
def test_root_redirects():
response = client.get("/", follow_redirects=False)
assert response.status_code in (301, 302, 307, 308)
def test_docs_page():
response = client.get("/docs")
assert response.status_code == 200