Esempio n. 1
0
 def test_to_bytes_2(self):
     header = MQTTFixedHeader(CONNECT, 0x00, 268435455)
     data = header.to_bytes()
     self.assertEqual(data, b'\x10\xff\xff\xff\x7f')
Esempio n. 2
0
 def test_to_bytes(self):
     header = MQTTFixedHeader(CONNECT, 0x00, 0)
     data = header.to_bytes()
     self.assertEqual(data, b'\x10\x00')
Esempio n. 3
0
 def test_to_bytes(self):
     header = MQTTFixedHeader(CONNECT, 0x00, 0)
     data = header.to_bytes()
     self.assertEqual(data, b'\x10\x00')
Esempio n. 4
0
 def test_to_bytes_2(self):
     header = MQTTFixedHeader(CONNECT, 0x00, 268435455)
     data = header.to_bytes()
     self.assertEqual(data, b'\x10\xff\xff\xff\x7f')
Esempio n. 5
0
 def test_to_bytes(self):
     header = MQTTFixedHeader(PacketType.CONNECT, 0x00, 0)
     data = header.to_bytes()
     self.assertEqual(data, b"\x10\x00")