diff --git a/tests/test_integration.py b/tests/test_integration.py index 24c9585..9907f4c 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -1,4 +1,5 @@ import asyncio +import collections.abc import contextlib import typing import uuid @@ -439,7 +440,7 @@ async def handler(msg: dict[str, int]) -> None: processed.append(msg) @contextlib.asynccontextmanager - async def lifespan(_context: ContextRepo) -> typing.AsyncIterator[None]: + async def lifespan(_context: ContextRepo) -> collections.abc.AsyncGenerator[None]: # AsgiFastStream injects its own app-level context, which is separate from # broker.context. Use broker.context explicitly so the middleware can find # the handler via self.context.