mosquitto/test/broker/12-prop-subpub-payload-format.py
Roger Light 9aec82b0e1 Finalise test proplists in the packet gen funcs.
This makes it easier to add part of a proplist in the test itself, and have the gen func add some more.
2019-01-08 18:37:38 +00:00

16 lines
561 B
Python
Executable File

#!/usr/bin/env python
# Test whether a client subscribed to a topic receives its own message sent to that topic.
# Does the Payload Format Indicator property get sent through?
# MQTT v5
import prop_subpub_helper as helper
from mosq_test_helper import *
props_out = mqtt5_props.gen_byte_prop(mqtt5_props.PROP_PAYLOAD_FORMAT_INDICATOR, 0xed)
props_out = props_out+mqtt5_props.gen_uint16_prop(mqtt5_props.PROP_TOPIC_ALIAS, 1)
props_in = mqtt5_props.gen_byte_prop(mqtt5_props.PROP_PAYLOAD_FORMAT_INDICATOR, 0xed)
helper.prop_subpub_helper(props_out, props_in)