From 5e52cf30c8d44a5c2176f451e17af96012bb2350 Mon Sep 17 00:00:00 2001 From: Pastukhov Nikita Date: Sat, 24 Aug 2024 07:41:36 +0300 Subject: [PATCH] fix: use async test subscribers functions (#1725) --- faststream/confluent/testing.py | 2 +- faststream/kafka/testing.py | 2 +- faststream/nats/testing.py | 2 +- faststream/rabbit/testing.py | 2 +- faststream/redis/testing.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/faststream/confluent/testing.py b/faststream/confluent/testing.py index a510fa9ea7..7fba2a7bc1 100644 --- a/faststream/confluent/testing.py +++ b/faststream/confluent/testing.py @@ -66,7 +66,7 @@ def create_publisher_fake_subscriber( if not sub.calls: @sub # type: ignore[misc] - def publisher_response_subscriber(msg: Any) -> None: + async def publisher_response_subscriber(msg: Any) -> None: pass broker.setup_subscriber(sub) diff --git a/faststream/kafka/testing.py b/faststream/kafka/testing.py index d8b585252f..db676f001f 100755 --- a/faststream/kafka/testing.py +++ b/faststream/kafka/testing.py @@ -55,7 +55,7 @@ def create_publisher_fake_subscriber( if not sub.calls: @sub # type: ignore[misc] - def publisher_response_subscriber(msg: Any) -> None: + async def publisher_response_subscriber(msg: Any) -> None: pass broker.setup_subscriber(sub) diff --git a/faststream/nats/testing.py b/faststream/nats/testing.py index cc14797af2..7d9b254118 100644 --- a/faststream/nats/testing.py +++ b/faststream/nats/testing.py @@ -33,7 +33,7 @@ def create_publisher_fake_subscriber( if not sub.calls: @sub - def publisher_response_subscriber(msg: Any) -> None: + async def publisher_response_subscriber(msg: Any) -> None: pass broker.setup_subscriber(sub) diff --git a/faststream/rabbit/testing.py b/faststream/rabbit/testing.py index a0cf2cd2e4..f2a9183c7c 100644 --- a/faststream/rabbit/testing.py +++ b/faststream/rabbit/testing.py @@ -66,7 +66,7 @@ def create_publisher_fake_subscriber( if not sub.calls: @sub - def publisher_response_subscriber(msg: Any) -> None: + async def publisher_response_subscriber(msg: Any) -> None: pass broker.setup_subscriber(sub) diff --git a/faststream/redis/testing.py b/faststream/redis/testing.py index def2ead166..690dda7df0 100644 --- a/faststream/redis/testing.py +++ b/faststream/redis/testing.py @@ -43,7 +43,7 @@ def create_publisher_fake_subscriber( if not sub.calls: @sub - def publisher_response_subscriber(msg: Any) -> None: + async def publisher_response_subscriber(msg: Any) -> None: pass broker.setup_subscriber(sub)