Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 652 for tutorial003_py39 (0.08 sec)

  1. docs/ru/docs/advanced/testing-events.md

    устаревших событий `startup` и `shutdown` вы можете использовать `TestClient` следующим образом:
    
    {* ../../docs_src/app_testing/tutorial003_py39.py hl[9:12,20:24] *}...
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 902 bytes
    - Viewed (0)
  2. 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í:
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 632 bytes
    - Viewed (0)
  3. 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)
  4. 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(
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 1.4K bytes
    - Viewed (0)
  5. 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():
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 308 bytes
    - Viewed (0)
  6. tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial003.py

    from fastapi.testclient import TestClient
    
    from docs_src.path_operation_advanced_configuration.tutorial003_py39 import app
    
    client = TestClient(app)
    
    
    def test_get():
        response = client.get("/items/")
        assert response.status_code == 200, response.text
        assert response.json() == [{"item_id": "Foo"}]
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        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
    - 580 bytes
    - Viewed (0)
  7. docs/ru/docs/how-to/configure-swagger-ui.md

    Например, чтобы отключить `deepLinking`, можно передать такие настройки в `swagger_ui_parameters`:
    
    {* ../../docs_src/configure_swagger_ui/tutorial003_py39.py hl[3] *}
    
    ## Другие параметры Swagger UI { #other-swagger-ui-parameters }
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 4.2K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_custom_response/test_tutorial002_tutorial003_tutorial004.py

    import importlib
    
    import pytest
    from fastapi.testclient import TestClient
    
    
    @pytest.fixture(
        name="mod_name",
        params=[
            pytest.param("tutorial002_py39"),
            pytest.param("tutorial003_py39"),
            pytest.param("tutorial004_py39"),
        ],
    )
    def get_mod_name(request: pytest.FixtureRequest) -> str:
        return request.param
    
    
    @pytest.fixture(name="client")
    def get_client(mod_name: str) -> TestClient:
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 1.8K bytes
    - Viewed (0)
  9. docs/en/docs/how-to/configure-swagger-ui.md

    For example, to disable `deepLinking` you could pass these settings to `swagger_ui_parameters`:
    
    {* ../../docs_src/configure_swagger_ui/tutorial003_py39.py hl[3] *}
    
    ## Other Swagger UI Parameters { #other-swagger-ui-parameters }
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 2.9K bytes
    - Viewed (0)
  10. docs/es/docs/how-to/configure-swagger-ui.md

    Por ejemplo, para desactivar `deepLinking` podrías pasar estas configuraciones a `swagger_ui_parameters`:
    
    {* ../../docs_src/configure_swagger_ui/tutorial003_py39.py hl[3] *}
    
    ## Otros parámetros de Swagger UI { #other-swagger-ui-parameters }
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 3.2K bytes
    - Viewed (0)
Back to top