Skip to content

Commit d82465d

Browse files
committed
on QoS
1 parent 0c48574 commit d82465d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/test_loop.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@ def test_loop_ping_vs_msgs_sent(self):
223223
# patch is_connected() to avoid CONNECT/CONNACK handling.
224224
mqtt_client.is_connected = lambda: True
225225

226+
# With QoS=0 no PUBACK message is sent, so Nulltet can be used.
226227
mocket = Nulltet()
227228
# pylint: disable=protected-access
228229
mqtt_client._sock = mocket
@@ -231,7 +232,7 @@ def test_loop_ping_vs_msgs_sent(self):
231232
topic = "foo"
232233
message = "bar"
233234
for _ in range(3 * keep_alive_timeout):
234-
mqtt_client.publish(topic, message)
235+
mqtt_client.publish(topic, message, qos=0)
235236
mqtt_client.loop(1)
236237
i += 1
237238

0 commit comments

Comments
 (0)