- Sort Score
- Result 10 results
- Languages All
Results 311 - 320 of 550 for tutorial009b_py39 (0.11 sec)
-
tests/test_tutorial/test_dependencies/test_tutorial008b.py
import importlib import pytest from fastapi.testclient import TestClient @pytest.fixture( name="client", params=[ pytest.param("tutorial008b_py39"), pytest.param("tutorial008b_an_py39"), ], ) def get_client(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.dependencies.{request.param}") client = TestClient(mod.app) return client
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 1K bytes - Viewed (0) -
tests/test_tutorial/test_path_operation_configurations/test_tutorial002b.py
from fastapi.testclient import TestClient from docs_src.path_operation_configuration.tutorial002b_py39 import app client = TestClient(app) def test_get_items(): response = client.get("/items/") assert response.status_code == 200, response.text assert response.json() == ["Portal gun", "Plumbus"] def test_get_users(): response = client.get("/users/") assert response.status_code == 200, response.text
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 1.7K bytes - Viewed (0) -
docs/de/docs/advanced/websockets.md
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 6.5K bytes - Viewed (0) -
tests/test_tutorial/test_custom_response/test_tutorial006c.py
from fastapi.testclient import TestClient from docs_src.custom_response.tutorial006c_py39 import app client = TestClient(app) def test_redirect_status_code(): response = client.get("/pydantic", follow_redirects=False) assert response.status_code == 302 assert response.headers["location"] == "https://docs.pydantic.dev/" def test_openapi_schema(): response = client.get("/openapi.json")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 904 bytes - Viewed (0) -
docs/de/docs/advanced/behind-a-proxy.md
In diesem Fall würde der ursprüngliche Pfad `/app` tatsächlich unter `/api/v1/app` bereitgestellt. Auch wenn Ihr gesamter Code unter der Annahme geschrieben ist, dass es nur `/app` gibt. {* ../../docs_src/behind_a_proxy/tutorial001_py39.py hl[6] *}Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 18.6K bytes - Viewed (0) -
tests/test_tutorial/test_body_nested_models/test_tutorial009.py
import importlib import pytest from fastapi.testclient import TestClient @pytest.fixture( name="client", params=[ "tutorial009_py39", ], ) def get_client(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.body_nested_models.{request.param}") client = TestClient(mod.app) return client def test_post_body(client: TestClient): data = {"2": 2.2, "3": 3.3}
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 4K bytes - Viewed (0) -
docs/en/docs/advanced/testing-websockets.md
# Testing WebSockets { #testing-websockets } You can use the same `TestClient` to test WebSockets. For this, you use the `TestClient` in a `with` statement, connecting to the WebSocket: {* ../../docs_src/app_testing/tutorial002_py39.py hl[27:31] *} /// note For more details, check Starlette's documentation for <a href="https://www.starlette.dev/testclient/#testing-websocket-sessions" class="external-link" target="_blank">testing WebSockets</a>.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 459 bytes - Viewed (0) -
tests/test_tutorial/test_testing/test_tutorial004.py
from docs_src.app_testing.tutorial004_py39 import test_read_items def test_main():
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 107 bytes - Viewed (0) -
docs/en/docs/advanced/websockets.md
But it's the simplest way to focus on the server-side of WebSockets and have a working example: {* ../../docs_src/websockets/tutorial001_py39.py hl[2,6:38,41:43] *} ## Create a `websocket` { #create-a-websocket } In your **FastAPI** application, create a `websocket`: {* ../../docs_src/websockets/tutorial001_py39.py hl[1,46:47] *} /// note | Technical Details You could also use `from starlette.websockets import WebSocket`.
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 5.7K bytes - Viewed (0) -
tests/test_tutorial/test_advanced_middleware/test_tutorial002.py
from fastapi.testclient import TestClient from docs_src.advanced_middleware.tutorial002_py39 import app def test_middleware(): client = TestClient(app, base_url="http://example.com") response = client.get("/") assert response.status_code == 200, response.text client = TestClient(app, base_url="http://subdomain.example.com") response = client.get("/") assert response.status_code == 200, response.text
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 575 bytes - Viewed (0)