- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for client_fixture (0.12 sec)
-
tests/test_security_scopes_sub_dependency.py
): return { "user_me": user_me, "user_items": user_items, } return app @pytest.fixture(name="client") def client_fixture(app: FastAPI): return TestClient(app) def test_security_scopes_sub_dependency_caching( client: TestClient, call_counts: dict[str, int] ): response = client.get("/")Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 2.9K bytes - Viewed (0) -
tests/test_stringified_annotation_dependency.py
client = DummyClient() yield client await client.close() Client = Annotated[DummyClient, Depends(get_client)] @pytest.fixture(name="client") def client_fixture() -> TestClient: app = FastAPI() @app.get("/") async def get_people(client: Client) -> list: return await client.get_people() client = TestClient(app) return client
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 2.2K bytes - Viewed (0) -
tests/test_security_scopes.py
db: Annotated[str, Depends(get_db)], user: Annotated[str, Security(get_user, scopes=["read"])], ): return {"db": db} return app @pytest.fixture(name="client") def client_fixture(app: FastAPI): return TestClient(app) def test_security_scopes_dependency_called_once( client: TestClient, call_counter: dict[str, int] ): response = client.get("/")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 1006 bytes - Viewed (0) -
tests/test_union_body_discriminator_annotated.py
import pytest from fastapi import FastAPI from fastapi.testclient import TestClient from inline_snapshot import snapshot from pydantic import BaseModel @pytest.fixture(name="client") def client_fixture() -> TestClient: from fastapi import Body from pydantic import Discriminator, Tag class Cat(BaseModel): pet_type: str = "cat" meows: int class Dog(BaseModel):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 20 15:55:38 UTC 2025 - 7.7K bytes - Viewed (0) -
tests/test_get_model_definitions_formfeed_escape.py
import pytest from fastapi import FastAPI from fastapi.testclient import TestClient from inline_snapshot import snapshot @pytest.fixture(name="client") def client_fixture() -> TestClient: from pydantic import BaseModel class Address(BaseModel): """ This is a public description of an Address \f You can't see this part of the docstring, it's private! """ line_1: str
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 5.8K bytes - Viewed (0)