- Sort Score
- Result 10 results
- Languages All
Results 491 - 500 of 924 for docs_src (0.3 sec)
-
tests/test_tutorial/test_testing/test_tutorial003.py
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 172 bytes - Viewed (0) -
docs/ru/docs/tutorial/schema-extra-example.md
Вы можете объявить `examples` для модели Pydantic, которые будут добавлены в сгенерированную JSON Schema. //// tab | Pydantic v2 {* ../../docs_src/schema_extra_example/tutorial001_py310.py hl[13:24] *} //// //// tab | Pydantic v1 {* ../../docs_src/schema_extra_example/tutorial001_pv1_py310.py hl[13:23] *} ////Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Tue Sep 30 11:24:39 UTC 2025 - 14.8K bytes - Viewed (0) -
docs/pt/docs/advanced/testing-websockets.md
# Testando WebSockets { #testing-websockets } Você pode usar o mesmo `TestClient` para testar WebSockets. Para isso, você utiliza o `TestClient` dentro de uma instrução `with`, conectando com o WebSocket: {* ../../docs_src/app_testing/tutorial002_py39.py hl[27:31] *} /// note | NotaRegistered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 497 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_py39 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 Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 526 bytes - Viewed (0) -
tests/test_tutorial/test_custom_request_and_route/test_tutorial002.py
pytest.param("tutorial002_an_py39"), pytest.param("tutorial002_an_py310", marks=needs_py310), ], ) def get_client(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.custom_request_and_route.{request.param}") client = TestClient(mod.app) return client def test_endpoint_works(client: TestClient): response = client.post("/", json=[1, 2, 3])
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 1.3K bytes - Viewed (0) -
tests/test_tutorial/test_metadata/test_tutorial003.py
from fastapi.testclient import TestClient from docs_src.metadata.tutorial003_py39 import app client = TestClient(app) def test_items(): response = client.get("/items/") assert response.status_code == 200, response.text assert response.json() == [{"name": "Foo"}] def test_openapi_schema(): response = client.get("/openapi.json") assert response.status_code == 200, response.text assert response.json() == {
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 1.5K bytes - Viewed (0) -
docs/es/docs/tutorial/extra-models.md
/// ## Múltiples modelos { #multiple-models } Aquí tienes una idea general de cómo podrían ser los modelos con sus campos de contraseña y los lugares donde se utilizan: {* ../../docs_src/extra_models/tutorial001_py310.py hl[7,9,14,20,22,27:28,31:33,38:39] *} /// info | Información En Pydantic v1 el método se llamaba `.dict()`, fue deprecado (pero aún soportado) en Pydantic v2, y renombrado a `.model_dump()`.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Tue Dec 16 16:33:45 UTC 2025 - 7.6K bytes - Viewed (0) -
tests/test_tutorial/test_custom_response/test_tutorial009c.py
from fastapi.testclient import TestClient from docs_src.custom_response.tutorial009c_py39 import app client = TestClient(app) def test_get(): response = client.get("/")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 244 bytes - Viewed (0) -
tests/test_tutorial/test_custom_response/test_tutorial007.py
from fastapi.testclient import TestClient from docs_src.custom_response.tutorial007_py39 import app client = TestClient(app) def test_get(): fake_content = b"some fake video bytes" response = client.get("/")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 269 bytes - Viewed (0) -
tests/test_tutorial/test_python_types/test_tutorial012.py
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 177 bytes - Viewed (0)