diff --git a/tests/test_loop.py b/tests/test_loop.py index 3cb1845..482d624 100644 --- a/tests/test_loop.py +++ b/tests/test_loop.py @@ -223,6 +223,7 @@ def test_loop_ping_vs_msgs_sent(self): # patch is_connected() to avoid CONNECT/CONNACK handling. mqtt_client.is_connected = lambda: True + # With QoS=0 no PUBACK message is sent, so Nulltet can be used. mocket = Nulltet() # pylint: disable=protected-access mqtt_client._sock = mocket @@ -231,7 +232,7 @@ def test_loop_ping_vs_msgs_sent(self): topic = "foo" message = "bar" for _ in range(3 * keep_alive_timeout): - mqtt_client.publish(topic, message) + mqtt_client.publish(topic, message, qos=0) mqtt_client.loop(1) i += 1