You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11 lines
286 B

from fastapi import FastAPI
from fastapi.testclient import TestClient
def test_default_404():
app = FastAPI()
client = TestClient(app)
response = client.get("/non-existing-route")
assert response.status_code == 404
assert response.json()["detail"] == "Not Found"