(dctx: DCtx, method: str, params: Mapping[str, Any] | None)
| 34 | conn_holder: list[Connection] = [] |
| 35 | |
| 36 | async def server_on_request(dctx: DCtx, method: str, params: Mapping[str, Any] | None) -> dict[str, Any]: |
| 37 | ctx: Context[_Lifespan] = Context(dctx, lifespan=_Lifespan("app"), connection=conn_holder[0]) |
| 38 | captured.append(ctx) |
| 39 | return {} |
| 40 | |
| 41 | async with running_pair(direct_pair, server_on_request=server_on_request) as (client, server, *_): |
| 42 | conn_holder.append(Connection.for_loop(server, session_id="sess-1")) |