diff --git a/propan/annotations.py b/propan/annotations.py index c22137ce..50533ddd 100644 --- a/propan/annotations.py +++ b/propan/annotations.py @@ -20,7 +20,7 @@ RabbitBroker = Annotated[RB, ContextField("broker")] RabbitMessage = Annotated[aio_pika.message.IncomingMessage, ContextField("message")] Channel = Annotated[ - aio_pika.robust_channel.RobustChannel, ContextField("broker._channel") + aio_pika.robust_channel.RobustChannel, ContextField("broker.channel") ] except Exception: RabbitBroker = RabbitMessage = Channel = about.INSTALL_RABBIT diff --git a/tests/fastapi/test_rabbit.py b/tests/fastapi/test_rabbit.py index 64c05425..cc9e2c60 100644 --- a/tests/fastapi/test_rabbit.py +++ b/tests/fastapi/test_rabbit.py @@ -1,6 +1,7 @@ +from unittest.mock import Mock + import pytest from fastapi import FastAPI -from unittest.mock import Mock from propan.fastapi import RabbitRouter from propan.test import TestRabbitBroker