Skip to content

Commit f70273d

Browse files
committed
add retain in on_message test
1 parent a3dc09a commit f70273d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Diff for: tests/test_mqtt_client.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@
3131

3232
class TestMQTTClient(base.IOTestCase):
3333

34-
def wait_until_connected(self, client, connect_value=True,
34+
def wait_until_connected(self, client, connect_value=True,
3535
timeout_sec=TIMEOUT_SEC):
36-
# Pump the specified client message loop and wait until it's connected,
37-
# or the specified timeout has ellapsed. Can specify an explicit
38-
# connection state to wait for by setting connect_value (defaults to
36+
# Pump the specified client message loop and wait until it's connected,
37+
# or the specified timeout has ellapsed. Can specify an explicit
38+
# connection state to wait for by setting connect_value (defaults to
3939
# waiting until connected, i.e. True).
4040
start = time.time()
4141
while client.is_connected() != connect_value and \
@@ -83,7 +83,7 @@ def test_subscribe_and_publish(self):
8383
client = MQTTClient(self.get_test_username(), self.get_test_key())
8484
# Save all on_message handler responses.
8585
messages = []
86-
def on_message(mqtt_client, feed, payload):
86+
def on_message(mqtt_client, feed, payload, retain):
8787
self.assertEqual(mqtt_client, client)
8888
messages.append((feed, payload))
8989
client.on_message = on_message

0 commit comments

Comments
 (0)