12-prop-subpub-payload-format.py 587 B

123456789101112131415
  1. #!/usr/bin/env python3
  2. # Test whether a client subscribed to a topic receives its own message sent to that topic.
  3. # Does the Payload Format Indicator property get sent through?
  4. # MQTT v5
  5. import prop_subpub_helper as helper
  6. from mosq_test_helper import *
  7. props_out = mqtt5_props.gen_byte_prop(mqtt5_props.PROP_PAYLOAD_FORMAT_INDICATOR, 0xed)
  8. props_out = props_out+mqtt5_props.gen_uint16_prop(mqtt5_props.PROP_TOPIC_ALIAS, 1)
  9. props_in = mqtt5_props.gen_byte_prop(mqtt5_props.PROP_PAYLOAD_FORMAT_INDICATOR, 0xed)
  10. helper.prop_subpub_helper(props_out, props_in, expect_proto_error=True)