We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d1accb3 commit 7f9f07aCopy full SHA for 7f9f07a
1 file changed
tests/test_middleware.py
@@ -1,6 +1,5 @@
1
from fastapi import status
2
-
3
-from .testclient import TestClient
+from fastapi.testclient import TestClient
4
5
6
def test_sync(client: TestClient) -> None:
@@ -13,6 +12,11 @@ def test_async(client: TestClient) -> None:
13
12
assert response.status_code == status.HTTP_200_OK
14
15
+def test_json(client: TestClient) -> None:
16
+ response = client.get("/openapi.json")
17
+ assert response.status_code == status.HTTP_200_OK
18
+
19
20
def test_404(client: TestClient) -> None:
21
response = client.get("/404")
22
assert response.status_code == status.HTTP_404_NOT_FOUND
0 commit comments