Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 30 for isSnapshot (0.08 sec)

  1. tests/test_tutorial/test_sql_databases/test_tutorial001.py

            assert response.json() == snapshot(
                {"age": 30, "secret_name": "Dive Wilson", "id": 999, "name": "Dead Pond"}
            )
    
            # Read a hero
            hero_id = response.json()["id"]
            response = client.get(f"/heroes/{hero_id}")
            assert response.status_code == 200, response.text
            assert response.json() == snapshot(
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 14K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_sql_databases/test_tutorial002.py

            assert response.json() == snapshot(
                [{"name": "Spider-Boy", "age": 18, "id": IsInt()}]
            )
    
            # Update a hero
            response = client.patch(
                f"/heroes/{hero_id}", json={"name": "Dog Pond", "age": None}
            )
            assert response.status_code == 200, response.text
            assert response.json() == snapshot(
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 17.9K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_header_param_models/test_tutorial001.py

    import importlib
    
    import pytest
    from fastapi.testclient import TestClient
    from inline_snapshot import snapshot
    
    from tests.utils import needs_py310
    
    
    @pytest.fixture(
        name="client",
        params=[
            pytest.param("tutorial001_py39"),
            pytest.param("tutorial001_py310", marks=needs_py310),
            pytest.param("tutorial001_an_py39"),
            pytest.param("tutorial001_an_py310", marks=needs_py310),
        ],
    )
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 7.3K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_header_param_models/test_tutorial003.py

    import importlib
    
    import pytest
    from fastapi.testclient import TestClient
    from inline_snapshot import snapshot
    
    from tests.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),
        ],
    )
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 8.5K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_header_param_models/test_tutorial002.py

    import importlib
    
    import pytest
    from fastapi.testclient import TestClient
    from inline_snapshot import snapshot
    
    from tests.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]),
        ],
    )
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 7.2K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_cookie_param_models/test_tutorial001.py

        assert response.status_code == 200
        assert response.json() == snapshot(
            {"session_id": "123", "fatebook_tracker": None, "googall_tracker": None}
        )
    
    
    def test_openapi_schema(client: TestClient):
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == snapshot(
            {
                "openapi": "3.1.0",
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 6K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_behind_a_proxy/test_tutorial004.py

    from fastapi.testclient import TestClient
    from inline_snapshot import snapshot
    
    from docs_src.behind_a_proxy.tutorial004_py39 import app
    
    client = TestClient(app)
    
    
    def test_main():
        response = client.get("/app")
        assert response.status_code == 200
        assert response.json() == {"message": "Hello World", "root_path": "/api/v1"}
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 1.4K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_query_param_models/test_tutorial002.py

    import importlib
    
    import pytest
    from fastapi.testclient import TestClient
    from inline_snapshot import snapshot
    
    from tests.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]),
        ],
    )
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 8K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_cookie_param_models/test_tutorial002.py

    import importlib
    
    import pytest
    from fastapi.testclient import TestClient
    from inline_snapshot import snapshot
    
    from tests.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]),
        ],
    )
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 6.3K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_behind_a_proxy/test_tutorial003.py

    from fastapi.testclient import TestClient
    from inline_snapshot import snapshot
    
    from docs_src.behind_a_proxy.tutorial003_py39 import app
    
    client = TestClient(app)
    
    
    def test_main():
        response = client.get("/app")
        assert response.status_code == 200
        assert response.json() == {"message": "Hello World", "root_path": "/api/v1"}
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 1.5K bytes
    - Viewed (0)
Back to top