Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 139 for tutorial003_py39 (0.26 sec)

  1. docs_src/dataclasses_/tutorial003_py39.py

    Motov Yurii <******@****.***> 1766745782 +0100
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 1.4K bytes
    - Viewed (0)
  2. 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")
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 8.3K bytes
    - Viewed (0)
  3. 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)
  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_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)
  7. tests/test_tutorial/test_dependencies/test_tutorial002_tutorial003_tutorial004.py

    
    @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),
            pytest.param("tutorial003_py39"),
            pytest.param("tutorial003_py310", marks=needs_py310),
            pytest.param("tutorial003_an_py39"),
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 6K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_path_params/test_tutorial003.py

    import pytest
    from fastapi.testclient import TestClient
    
    from docs_src.path_params.tutorial003_py39 import app
    
    client = TestClient(app)
    
    
    @pytest.mark.parametrize(
        ("user_id", "expected_response"),
        [
            ("me", {"user_id": "the current user"}),
            ("alice", {"user_id": "alice"}),
        ],
    )
    def test_get_users(user_id: str, expected_response: dict):
        response = client.get(f"/users/{user_id}")
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 4.6K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_query_params_str_validations/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),
            pytest.param("tutorial003_an_py39"),
            pytest.param("tutorial003_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
    - 5.1K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_path_operation_configurations/test_tutorial003_tutorial004.py

        """).strip(),
    }
    
    
    @pytest.fixture(
        name="mod_name",
        params=[
            pytest.param("tutorial003_py39"),
            pytest.param("tutorial003_py310", marks=needs_py310),
            pytest.param("tutorial004_py39"),
            pytest.param("tutorial004_py310", marks=needs_py310),
        ],
    )
    def get_mod_name(request: pytest.FixtureRequest) -> str:
        return request.param
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 7K bytes
    - Viewed (0)
Back to top