- Sort Score
- Num 10 results
- Language All
Results 41 - 50 of 104 for Fixture (0.06 seconds)
-
tests/test_tutorial/test_body_nested_models/test_tutorial007.py
import importlib import pytest from fastapi.testclient import TestClient from inline_snapshot import snapshot from ...utils import needs_py310 @pytest.fixture( name="client", params=[ pytest.param("tutorial007_py310", marks=needs_py310), ], ) def get_client(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.body_nested_models.{request.param}") client = TestClient(mod.app)Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 11.6K bytes - Click Count (0) -
tests/test_filter_pydantic_sub_model_pv2.py
import pytest from dirty_equals import HasRepr from fastapi import Depends, FastAPI from fastapi.exceptions import ResponseValidationError from fastapi.testclient import TestClient from inline_snapshot import snapshot @pytest.fixture(name="client") def get_client(): from pydantic import BaseModel, ValidationInfo, field_validator app = FastAPI() class ModelB(BaseModel): username: str class ModelC(ModelB):
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 6.7K bytes - Click Count (0) -
tests/test_tutorial/test_body_multiple_params/test_tutorial005.py
import importlib import pytest from fastapi.testclient import TestClient from inline_snapshot import snapshot from ...utils import needs_py310 @pytest.fixture( name="client", params=[ pytest.param("tutorial005_py310", marks=needs_py310), pytest.param("tutorial005_an_py310", marks=needs_py310), ], ) def get_client(request: pytest.FixtureRequest):Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 8.9K bytes - Click Count (0) -
tests/test_tutorial/test_body/test_tutorial001.py
import importlib from unittest.mock import patch import pytest from fastapi.testclient import TestClient from inline_snapshot import snapshot from ...utils import needs_py310 @pytest.fixture( name="client", params=[ pytest.param("tutorial001_py310", marks=needs_py310), ], ) def get_client(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.body.{request.param}")Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Mon Feb 23 17:45:20 GMT 2026 - 11.1K bytes - Click Count (0) -
tests/test_tutorial/test_body_multiple_params/test_tutorial004.py
import importlib import pytest from fastapi.testclient import TestClient from inline_snapshot import snapshot from ...utils import needs_py310 @pytest.fixture( name="client", params=[ pytest.param("tutorial004_py310", marks=needs_py310), pytest.param("tutorial004_an_py310", marks=needs_py310), ], ) def get_client(request: pytest.FixtureRequest):Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 10K bytes - Click Count (0) -
tests/test_tutorial/test_body_multiple_params/test_tutorial002.py
import importlib import pytest from fastapi.testclient import TestClient from inline_snapshot import snapshot from ...utils import needs_py310 @pytest.fixture( name="client", params=[ pytest.param("tutorial002_py310", marks=needs_py310), ], ) def get_client(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.body_multiple_params.{request.param}") client = TestClient(mod.app)Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 11.7K bytes - Click Count (0) -
tests/test_tutorial/test_body_nested_models/test_tutorial005.py
import importlib import pytest from dirty_equals import IsList from fastapi.testclient import TestClient from inline_snapshot import snapshot from ...utils import needs_py310 @pytest.fixture( name="client", params=[ pytest.param("tutorial005_py310", marks=needs_py310), ], ) def get_client(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.body_nested_models.{request.param}")Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 10.3K bytes - Click Count (0) -
tests/test_router_events.py
app_startup: bool = False app_shutdown: bool = False router_startup: bool = False router_shutdown: bool = False sub_router_startup: bool = False sub_router_shutdown: bool = False @pytest.fixture def state() -> State: return State() @pytest.mark.filterwarnings( r"ignore:\s*on_event is deprecated, use lifespan event handlers instead.*:DeprecationWarning" )Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 11.7K bytes - Click Count (0) -
tests/benchmarks/test_general_performance.py
@app.get("/async/model-with-response-model", response_model=ItemOut) async def async_model_with_response_model( dep: Annotated[int, Depends(dep_b)], ): return ItemOut(name="foo", value=123, dep=dep) @pytest.fixture(scope="module") def client() -> Iterator[TestClient]: with TestClient(app) as client: yield client def _bench_get(benchmark, client: TestClient, path: str) -> tuple[int, bytes]:
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Dec 26 20:40:26 GMT 2025 - 11.1K bytes - Click Count (0) -
tests/test_sse.py
@router.get("/events", response_class=EventSourceResponse) async def stream_events(): yield {"msg": "hello"} yield {"msg": "world"} app.include_router(router, prefix="/api") @pytest.fixture(name="client") def client_fixture(): with TestClient(app) as c: yield c def test_async_generator_with_model(client: TestClient): response = client.get("/items/stream")
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Mar 01 09:21:52 GMT 2026 - 9.8K bytes - Click Count (0)