We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 859f7e5 commit fd5ac7aCopy full SHA for fd5ac7a
tests/test_listen.py
@@ -1,5 +1,7 @@
1
from unittest import mock
2
3
+from confluent_kafka import TopicPartition
4
+
5
from saluki.listen import listen
6
7
@@ -14,8 +16,7 @@ def test_listen_with_partition_assigns_to_partition():
14
16
mock.patch("saluki.listen.Consumer") as c,
15
17
):
18
listen("somebroker", "sometopic", partition=expected_partition)
- assert c.return_value.assign.call_args[0][0][0].topic == topic
- assert c.return_value.assign.call_args[0][0][0].partition == expected_partition
19
+ c.return_value.assign.assert_called_with([TopicPartition(topic, expected_partition)])
20
21
22
def test_keyboard_interrupt_causes_consumer_to_close():
0 commit comments