- Sort Score
- Result 10 results
- Languages All
Results 471 - 480 of 616 for tutorial012_py39 (0.08 sec)
-
tests/test_tutorial/test_additional_responses/test_tutorial001.py
from fastapi.testclient import TestClient from docs_src.additional_responses.tutorial001_py39 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 Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 4.3K bytes - Viewed (0) -
tests/test_tutorial/test_handling_errors/test_tutorial005.py
from fastapi.testclient import TestClient from docs_src.handling_errors.tutorial005_py39 import app client = TestClient(app) def test_post_validation_error(): response = client.post("/items/", json={"title": "towel", "size": "XL"}) assert response.status_code == 422, response.text assert response.json() == { "detail": [ { "type": "int_parsing", "loc": ["body", "size"],
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 3.9K bytes - Viewed (0) -
tests/test_tutorial/test_query_params_str_validations/test_tutorial010.py
from fastapi._compat import PYDANTIC_VERSION_MINOR_TUPLE from fastapi.testclient import TestClient from ...utils import needs_py310 @pytest.fixture( name="client", params=[ pytest.param("tutorial010_py39"), pytest.param("tutorial010_py310", marks=needs_py310), pytest.param("tutorial010_an_py39"), pytest.param("tutorial010_an_py310", marks=needs_py310), ], )
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 5.8K bytes - Viewed (0) -
tests/test_tutorial/test_request_form_models/test_tutorial002.py
import importlib import pytest from fastapi.testclient import TestClient @pytest.fixture( name="client", params=[ "tutorial002_py39", "tutorial002_an_py39", ], ) def get_client(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.request_form_models.{request.param}") client = TestClient(mod.app) return client def test_post_body_form(client: TestClient):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 20 15:55:38 UTC 2025 - 6.2K bytes - Viewed (0) -
tests/test_tutorial/test_query_params_str_validations/test_tutorial002.py
import importlib 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), pytest.param("tutorial002_an_py39"), pytest.param("tutorial002_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.9K bytes - Viewed (0) -
tests/test_tutorial/test_configure_swagger_ui/test_tutorial003.py
from fastapi.testclient import TestClient from docs_src.configure_swagger_ui.tutorial003_py39 import app client = TestClient(app) def test_swagger_ui(): response = client.get("/docs") assert response.status_code == 200, response.text assert '"deepLinking": false,' in response.text, ( "overridden configs should be preserved" ) assert '"deepLinking": true' not in response.text, (
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 1.5K bytes - Viewed (0) -
docs/ru/docs/tutorial/static-files.md
## Использование `StaticFiles` { #use-staticfiles } * Импортируйте `StaticFiles`. * "Примонтируйте" экземпляр `StaticFiles()` к определённому пути. {* ../../docs_src/static_files/tutorial001_py39.py hl[2,6] *} /// note | Технические детали Вы также можете использовать `from starlette.staticfiles import StaticFiles`.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 3.1K bytes - Viewed (0) -
tests/test_tutorial/test_events/test_tutorial001.py
import pytest from fastapi import FastAPI from fastapi.testclient import TestClient @pytest.fixture(name="app", scope="module") def get_app(): with pytest.warns(DeprecationWarning): from docs_src.events.tutorial001_py39 import app yield app def test_events(app: FastAPI): with TestClient(app) as client: response = client.get("/items/foo") 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 - 3.6K bytes - Viewed (0) -
docs/ru/docs/how-to/conditional-openapi.md
Вы можете легко использовать те же настройки Pydantic, чтобы настроить сгенерированный OpenAPI и интерфейсы документации. Например: {* ../../docs_src/conditional_openapi/tutorial001_py39.py hl[6,11] *} Здесь мы объявляем настройку `openapi_url` с тем же значением по умолчанию — `"/openapi.json"`. Затем используем её при создании приложения FastAPI.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 4.1K bytes - Viewed (0) -
tests/test_tutorial/test_body/test_tutorial003.py
import importlib import pytest from fastapi.testclient import TestClient from ...utils import needs_py310 @pytest.fixture( name="client", params=[ pytest.param("tutorial003_py39"), pytest.param("tutorial003_py310", marks=needs_py310), ], ) def get_client(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.body.{request.param}") client = TestClient(mod.app)
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 5.5K bytes - Viewed (0)