File size: 332 Bytes
db56fd6
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
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