docappointemet / tests /test_main.py
Admin Idiakhoa
Add initial app code
db56fd6
raw
history blame contribute delete
332 Bytes
import httpx
from app.main import app # Assuming your FastAPI app instance is here
def test_read_main():
"""Tests that the root endpoint is reachable and returns a 200 OK status."""
with httpx.Client(app=app, base_url="http://test") as client:
response = client.get("/")
assert response.status_code == 200