- Sort Score
- Num 10 results
- Language All
Results 31 - 40 of 515 for tutorial003_py39 (0.07 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
docs/de/docs/advanced/events.md
Beginnen wir mit einem Beispiel und sehen es uns dann im Detail an. Wir erstellen eine asynchrone Funktion `lifespan()` mit `yield` wie folgt: {* ../../docs_src/events/tutorial003_py39.py hl[16,19] *}Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 9.5K bytes - Click Count (0) -
tests/test_tutorial/test_generate_clients/test_tutorial004.py
from docs_src.generate_clients import tutorial003_py39 def test_remove_tags(tmp_path: pathlib.Path): tmp_file = tmp_path / "openapi.json" openapi_json = tutorial003_py39.app.openapi() tmp_file.write_text(json.dumps(openapi_json)) with patch("pathlib.Path", return_value=tmp_file): importlib.import_module("docs_src.generate_clients.tutorial004_py39")
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Dec 26 10:43:02 GMT 2025 - 8.3K bytes - Click Count (0) -
docs/en/docs/advanced/testing-events.md
{* ../../docs_src/app_testing/tutorial004_py39.py hl[9:15,18,27:28,30:32,41:43] *} You can read more details about the ["Running lifespan in tests in the official Starlette documentation site."](https://www.starlette.dev/lifespan/#running-lifespan-in-tests) For the deprecated `startup` and `shutdown` events, you can use the `TestClient` as follows:Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 626 bytes - Click Count (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() == {
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Dec 26 10:43:02 GMT 2025 - 1.5K bytes - Click Count (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
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 1.3K bytes - Click Count (0) -
tests/test_tutorial/test_testing/test_tutorial003.py
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 172 bytes - Click Count (0) -
docs/ru/docs/advanced/testing-events.md
устаревших событий `startup` и `shutdown` вы можете использовать `TestClient` следующим образом: {* ../../docs_src/app_testing/tutorial003_py39.py hl[9:12,20:24] *}...Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 902 bytes - Click Count (0) -
docs/es/docs/advanced/testing-events.md
{* ../../docs_src/app_testing/tutorial004_py39.py hl[9:15,18,27:28,30:32,41:43] *} Puedes leer más detalles sobre ["Ejecutar lifespan en tests en el sitio oficial de documentación de Starlette."](https://www.starlette.dev/lifespan/#running-lifespan-in-tests) Para los eventos obsoletos `startup` y `shutdown`, puedes usar el `TestClient` así:Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 632 bytes - Click Count (0) -
tests/test_tutorial/test_first_steps/test_tutorial001_tutorial002_tutorial003.py
import importlib import pytest from fastapi.testclient import TestClient @pytest.fixture( name="client", params=[ "tutorial001_py39", "tutorial003_py39", ], ) def get_client(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.first_steps.{request.param}") client = TestClient(mod.app) return client @pytest.mark.parametrize(
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Dec 26 10:43:02 GMT 2025 - 1.4K bytes - Click Count (0) -
tests/test_tutorial/test_python_types/test_tutorial003.py
import pytest from docs_src.python_types.tutorial003_py39 import get_name_with_age def test_get_name_with_age_pass_int(): with pytest.raises(TypeError): get_name_with_age("John", 30) def test_get_name_with_age_pass_str():
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Dec 26 10:43:02 GMT 2025 - 308 bytes - Click Count (0)