mosquitto/test/broker/07-will-qos0-helper.py
2019-03-28 21:32:12 +00:00

19 lines
464 B
Python
Executable File

#!/usr/bin/env python3
# Connect a client with a will, then disconnect without DISCONNECT.
from mosq_test_helper import *
rc = 1
keepalive = 60
connect_packet = mosq_test.gen_connect("test-helper", keepalive=keepalive, will_topic="will/qos0/test", will_payload=b"will-message")
connack_packet = mosq_test.gen_connack(rc=0)
port = mosq_test.get_port()
sock = mosq_test.do_client_connect(connect_packet, connack_packet, port=port)
rc = 0
sock.close()
exit(rc)