diff --git a/tests/test_default_404.py b/tests/test_default_404.py new file mode 100644 index 000000000..758a86cf7 --- /dev/null +++ b/tests/test_default_404.py @@ -0,0 +1,11 @@ +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"