Skip to content

Commit

Permalink
fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ric-evans committed Dec 1, 2023
1 parent 7ea135a commit e2ec313
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/abstract_broker_client_tests/unit_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ async def test_ack_message(self, mock_con: Any, queue_name: str) -> None:
self.broker_client, "rabbitmq.BrokerClient"
): # HACK: manually set attr
mock_con.return_value.is_closed = False
sub._get_channel_by_msg = lambda *args: sub.channels[0] # type: ignore[attr-defined]
sub._get_channel_by_msg = lambda *args: sub.active_channels[0] # type: ignore[attr-defined]

await sub.ack_message(
Message(12, b""),
Expand All @@ -104,7 +104,7 @@ async def test_reject_message(self, mock_con: Any, queue_name: str) -> None:
self.broker_client, "rabbitmq.BrokerClient"
): # HACK: manually set attr
mock_con.return_value.is_closed = False
sub._get_channel_by_msg = lambda *args: sub.channels[0] # type: ignore[attr-defined]
sub._get_channel_by_msg = lambda *args: sub.active_channels[0] # type: ignore[attr-defined]

await sub.reject_message(
Message(12, b""),
Expand Down

0 comments on commit e2ec313

Please sign in to comment.