MCPcopy Create free account
hub / github.com/anthropics/anthropic-sdk-python / async_fn

Method async_fn

tests/test_middleware.py:2141–2142  ·  view source on GitHub ↗
(request: APIRequest, call_next: AsyncCallNext)

Source from the content-addressed store, hash-verified

2139
2140 def test_construction_accepts_async_middleware(self) -> None:
2141 async def async_fn(request: APIRequest, call_next: AsyncCallNext) -> Any:
2142 return await call_next(request)
2143
2144 client = make_async_client(middleware=[AsyncOnlyMiddleware(), RecordingMiddleware(), async_fn])
2145 assert len(client._middleware) == 3

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected