mosquitto/test/broker/07-will-qos0-helper.py

19 lines
462 B
Python
Raw Normal View History

2014-05-07 22:27:00 +00:00
#!/usr/bin/env python
# Connect a client with a will, then disconnect without DISCONNECT.
2018-11-27 11:26:21 +00:00
from mosq_test_helper import *
2014-05-07 22:27:00 +00:00
rc = 1
keepalive = 60
connect_packet = mosq_test.gen_connect("test-helper", keepalive=keepalive, will_topic="will/qos0/test", will_payload="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)
2014-05-07 22:27:00 +00:00
rc = 0
sock.close()
2014-05-07 22:27:00 +00:00
exit(rc)