- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for get_broken (0.05 sec)
-
tests/test_dependency_yield_scope_websockets.py
match='The dependency "get_named_func_session" has a scope of "request", it cannot depend on dependencies with scope "function"', ): @app.websocket("/broken-scope") async def get_broken( websocket: WebSocket, sessions: BrokenSessionsDep ) -> Any: # pragma: no cover pass def test_named_function_scope() -> None: global_context.set({})
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 6K bytes - Viewed (0) -
tests/test_dependency_yield_scope.py
FastAPIError, match='The dependency "get_named_func_session" has a scope of "request", it cannot depend on dependencies with scope "function"', ): @app.get("/broken-scope") def get_broken(sessions: BrokenSessionsDep) -> Any: # pragma: no cover pass def test_named_function_scope() -> None: response = client.get("/named-function-scope") assert response.status_code == 200Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 6.7K bytes - Viewed (0) -
tests/test_security_oauth2_authorization_code_bearer_scopes_openapi.py
tokenUrl="token", auto_error=True, scopes={"read": "Read access", "write": "Write access"}, ) async def get_token(token: Annotated[str, Depends(oauth2_scheme)]) -> str: return token app = FastAPI(dependencies=[Depends(get_token)]) @app.get("/") async def root(): return {"message": "Hello World"} @app.get( "/with-oauth2-scheme",
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 6.6K bytes - Viewed (0) -
tests/test_security_oauth2_authorization_code_bearer_scopes_openapi_simple.py
tokenUrl="/api/oauth/token", scopes={"read": "Read access", "write": "Write access"}, ) async def get_token(token: Annotated[str, Depends(oauth2_scheme)]) -> str: return token app = FastAPI(dependencies=[Depends(get_token)]) @app.get("/admin", dependencies=[Security(get_token, scopes=["read", "write"])]) async def read_admin(): return {"message": "Admin Access"} client = TestClient(app)Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 2.6K bytes - Viewed (0)