- Sort Score
- Result 10 results
- Languages All
Results 241 - 250 of 350 for tutorial003_py310 (0.05 sec)
-
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) -
tests/test_tutorial/test_separate_openapi_schemas/test_tutorial002.py
import pytest from fastapi.testclient import TestClient from ...utils import needs_py310 @pytest.fixture( name="client", params=[ pytest.param("tutorial002_py39"), pytest.param("tutorial002_py310", marks=needs_py310), ], ) def get_client(request: pytest.FixtureRequest) -> TestClient: mod = importlib.import_module(f"docs_src.separate_openapi_schemas.{request.param}") client = TestClient(mod.app)
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 20 15:55:38 UTC 2025 - 5K bytes - Viewed (0) -
docs/ru/docs/tutorial/encoder.md
Для этого можно использовать функцию `jsonable_encoder`. Она принимает объект, например, Pydantic-модель, и возвращает его версию, совместимую с JSON: {* ../../docs_src/encoder/tutorial001_py310.py hl[4,21] *} В данном примере она преобразует Pydantic-модель в `dict`, а `datetime` - в `str`.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Tue Sep 30 11:24:39 UTC 2025 - 2.7K bytes - Viewed (0) -
tests/test_tutorial/test_additional_responses/test_tutorial002.py
import pytest from fastapi.testclient import TestClient from tests.utils import needs_py310 @pytest.fixture( name="client", params=[ pytest.param("tutorial002_py39"), pytest.param("tutorial002_py310", marks=needs_py310), ], ) def get_client(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.additional_responses.{request.param}") client = TestClient(mod.app)
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 4.7K bytes - Viewed (0) -
tests/test_tutorial/test_websockets/test_tutorial003.py
import importlib from types import ModuleType import pytest from fastapi.testclient import TestClient @pytest.fixture( name="mod", params=[ pytest.param("tutorial003_py39"), ], ) def get_mod(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.websockets.{request.param}") return mod @pytest.fixture(name="html") def get_html(mod: ModuleType): return mod.html
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 1.3K bytes - Viewed (0) -
tests/test_tutorial/test_query_params_str_validations/test_tutorial009.py
import pytest from fastapi.testclient import TestClient from ...utils import needs_py310 @pytest.fixture( name="client", params=[ pytest.param("tutorial009_py39"), pytest.param("tutorial009_py310", marks=needs_py310), pytest.param("tutorial009_an_py39"), pytest.param("tutorial009_an_py310", marks=needs_py310), ], ) def get_client(request: pytest.FixtureRequest):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 4.3K bytes - Viewed (0) -
tests/test_tutorial/test_additional_status_codes/test_tutorial001.py
import pytest from fastapi.testclient import TestClient from ...utils import needs_py310 @pytest.fixture( name="client", params=[ "tutorial001_py39", pytest.param("tutorial001_py310", marks=needs_py310), "tutorial001_an_py39", pytest.param("tutorial001_an_py310", marks=needs_py310), ], ) def get_client(request: pytest.FixtureRequest):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 993 bytes - Viewed (0) -
docs/es/docs/tutorial/encoder.md
Puedes usar `jsonable_encoder` para eso. Recibe un objeto, como un modelo de Pydantic, y devuelve una versión compatible con JSON: {* ../../docs_src/encoder/tutorial001_py310.py hl[4,21] *} En este ejemplo, convertiría el modelo de Pydantic a un `dict`, y el `datetime` a un `str`.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Tue Dec 16 16:33:45 UTC 2025 - 1.8K bytes - Viewed (0) -
docs/de/docs/tutorial/encoder.md
Sie können für diese Fälle `jsonable_encoder` verwenden. Es nimmt ein Objekt entgegen, wie etwa ein Pydantic-Modell, und gibt eine JSON-kompatible Version zurück: {* ../../docs_src/encoder/tutorial001_py310.py hl[4,21] *} In diesem Beispiel wird das Pydantic-Modell in ein `dict`, und das `datetime`-Objekt in ein `str` konvertiert.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Sep 20 15:10:09 UTC 2025 - 1.8K bytes - Viewed (0) -
tests/test_tutorial/test_response_model/test_tutorial004.py
from inline_snapshot import snapshot from ...utils import needs_py310 @pytest.fixture( name="client", params=[ pytest.param("tutorial004_py39"), pytest.param("tutorial004_py310", marks=needs_py310), ], ) def get_client(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.response_model.{request.param}") client = TestClient(mod.app) return client
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 5.3K bytes - Viewed (0)