- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 12 for test_path_operation (0.17 sec)
-
tests/test_additional_response_extra.py
@sub_router.get("/") def read_item(): return {"id": "foo"} router.include_router(sub_router, prefix="/items") app.include_router(router) client = TestClient(app) def test_path_operation(): response = client.get("/items/") assert response.status_code == 200, response.text assert response.json() == {"id": "foo"} def test_openapi_schema(): response = client.get("/openapi.json")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 1.2K bytes - Viewed (0) -
tests/test_tutorial/test_additional_responses/test_tutorial002.py
import os import shutil from dirty_equals import IsDict from fastapi.testclient import TestClient from docs_src.additional_responses.tutorial002 import app client = TestClient(app) def test_path_operation(): response = client.get("/items/foo") assert response.status_code == 200, response.text assert response.json() == {"id": "foo", "value": "there goes my hero"} def test_path_operation_img():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 4.6K bytes - Viewed (0) -
tests/test_tutorial/test_response_change_status_code/test_tutorial001.py
from fastapi.testclient import TestClient from docs_src.response_change_status_code.tutorial001 import app client = TestClient(app) def test_path_operation(): response = client.put("/get-or-create-task/foo") print(response.content) assert response.status_code == 200, response.text assert response.json() == "Listen to the Bar Fighters" response = client.put("/get-or-create-task/bar")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Jul 09 18:06:12 UTC 2020 - 521 bytes - Viewed (0) -
tests/test_tutorial/test_response_cookies/test_tutorial001.py
from fastapi.testclient import TestClient from docs_src.response_cookies.tutorial001 import app client = TestClient(app) def test_path_operation(): response = client.post("/cookie/") assert response.status_code == 200, response.text assert response.json() == {"message": "Come to the dark side, we have cookies"}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Jul 09 18:06:12 UTC 2020 - 403 bytes - Viewed (0) -
tests/test_tutorial/test_response_cookies/test_tutorial002.py
from fastapi.testclient import TestClient from docs_src.response_cookies.tutorial002 import app client = TestClient(app) def test_path_operation(): response = client.post("/cookie-and-object/") assert response.status_code == 200, response.text assert response.json() == {"message": "Come to the dark side, we have cookies"}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Jul 09 18:06:12 UTC 2020 - 414 bytes - Viewed (0) -
tests/test_tutorial/test_response_headers/test_tutorial002.py
from fastapi.testclient import TestClient from docs_src.response_headers.tutorial002 import app client = TestClient(app) def test_path_operation(): response = client.get("/headers-and-object/") assert response.status_code == 200, response.text assert response.json() == {"message": "Hello World"}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Jul 09 18:06:12 UTC 2020 - 378 bytes - Viewed (0) -
tests/test_tutorial/test_response_headers/test_tutorial001.py
from fastapi.testclient import TestClient from docs_src.response_headers.tutorial001 import app client = TestClient(app) def test_path_operation(): response = client.get("/headers/") assert response.status_code == 200, response.text assert response.json() == {"message": "Hello World"} assert response.headers["X-Cat-Dog"] == "alone in the world"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Jul 09 18:06:12 UTC 2020 - 426 bytes - Viewed (0) -
tests/test_tutorial/test_additional_responses/test_tutorial004.py
import os import shutil from dirty_equals import IsDict from fastapi.testclient import TestClient from docs_src.additional_responses.tutorial004 import app client = TestClient(app) def test_path_operation(): response = client.get("/items/foo") assert response.status_code == 200, response.text assert response.json() == {"id": "foo", "value": "there goes my hero"} def test_path_operation_img():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 4.8K bytes - Viewed (0) -
tests/test_tutorial/test_additional_responses/test_tutorial001.py
from fastapi.testclient import TestClient from docs_src.additional_responses.tutorial001 import app client = TestClient(app) def test_path_operation(): response = client.get("/items/foo") assert response.status_code == 200, response.text assert response.json() == {"id": "foo", "value": "there goes my hero"} def test_path_operation_not_found(): response = client.get("/items/bar")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 4.3K bytes - Viewed (0) -
tests/test_tutorial/test_additional_responses/test_tutorial003.py
from fastapi.testclient import TestClient from docs_src.additional_responses.tutorial003 import app client = TestClient(app) def test_path_operation(): response = client.get("/items/foo") assert response.status_code == 200, response.text assert response.json() == {"id": "foo", "value": "there goes my hero"} def test_path_operation_not_found(): response = client.get("/items/bar")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 4.5K bytes - Viewed (0)