def test_to_bytes_2(self): header = MQTTFixedHeader(CONNECT, 0x00, 268435455) data = header.to_bytes() self.assertEqual(data, b'\x10\xff\xff\xff\x7f')
def test_to_bytes(self): header = MQTTFixedHeader(CONNECT, 0x00, 0) data = header.to_bytes() self.assertEqual(data, b'\x10\x00')
def test_to_bytes(self): header = MQTTFixedHeader(PacketType.CONNECT, 0x00, 0) data = header.to_bytes() self.assertEqual(data, b"\x10\x00")