diff --git a/tests/asyncapi/base/arguments.py b/tests/asyncapi/base/arguments.py index 642ed24dbf..16386749d3 100644 --- a/tests/asyncapi/base/arguments.py +++ b/tests/asyncapi/base/arguments.py @@ -434,7 +434,7 @@ async def handle(user: descriminator): ... schema = get_app_schema(self.build_app(broker)).to_jsonable() - key = next(schema["components"]["messages"].keys()) + key = next(iter(schema["components"]["messages"].keys())) assert key == IsStr(regex=r"test[\w:]*:Handle:Message") assert schema["components"] == { "messages": {