Skip to content

Commit

Permalink
pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
sheldygg committed Nov 26, 2024
1 parent 51d7f6a commit c98da92
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/brokers/base/middlewares.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,9 @@ async def handler(msg):

assert [c.args[0] for c in mock.call_args_list] == ["outer", "middle", "inner"]

async def test_publisher_with_router_middleware_order(self, queue: str, mock: Mock, raw_broker):
async def test_publisher_with_router_middleware_order(
self, queue: str, mock: Mock, raw_broker
):
class InnerMiddleware(BaseMiddleware):
async def publish_scope(self, call_next, msg, *args, **kwargs):
mock.publish_inner()
Expand Down Expand Up @@ -196,7 +198,9 @@ async def handler(msg):

assert [c.args[0] for c in mock.call_args_list] == ["outer", "middle", "inner"]

async def test_consume_with_middleware_order(self, queue: str, mock: Mock, raw_broker):
async def test_consume_with_middleware_order(
self, queue: str, mock: Mock, raw_broker
):
class InnerMiddleware(BaseMiddleware):
async def consume_scope(self, call_next, msg):
mock.consume_inner()
Expand Down
1 change: 1 addition & 0 deletions tests/brokers/confluent/test_middlewares.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class TestMiddlewares(ConfluentTestcaseConfig, MiddlewareTestcase):
class TestExceptionMiddlewares(ConfluentTestcaseConfig, ExceptionMiddlewareTestcase):
broker_class = KafkaBroker


@pytest.mark.confluent
class TestMiddlewaresOrder(MiddlewaresOrderTestcase):
broker_class = KafkaBroker
1 change: 1 addition & 0 deletions tests/brokers/kafka/test_middlewares.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class TestMiddlewares(MiddlewareTestcase):
class TestExceptionMiddlewares(ExceptionMiddlewareTestcase):
broker_class = KafkaBroker


@pytest.mark.kafka
class TestMiddlewaresOrder(MiddlewaresOrderTestcase):
broker_class = KafkaBroker
1 change: 1 addition & 0 deletions tests/brokers/rabbit/test_middlewares.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class TestMiddlewares(MiddlewareTestcase):
class TestExceptionMiddlewares(ExceptionMiddlewareTestcase):
broker_class = RabbitBroker


@pytest.mark.rabbit
class TestMiddlewaresOrder(MiddlewaresOrderTestcase):
broker_class = RabbitBroker
1 change: 1 addition & 0 deletions tests/brokers/redis/test_middlewares.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class TestMiddlewares(MiddlewareTestcase):
class TestExceptionMiddlewares(ExceptionMiddlewareTestcase):
broker_class = RedisBroker


@pytest.mark.redis
class TestMiddlewaresOrder(MiddlewaresOrderTestcase):
broker_class = RedisBroker

0 comments on commit c98da92

Please sign in to comment.