예제 #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')
예제 #2
0
 def test_to_bytes(self):
     header = MQTTFixedHeader(CONNECT, 0x00, 0)
     data = header.to_bytes()
     self.assertEqual(data, b'\x10\x00')
예제 #3
0
 def test_to_bytes(self):
     header = MQTTFixedHeader(CONNECT, 0x00, 0)
     data = header.to_bytes()
     self.assertEqual(data, b'\x10\x00')
예제 #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')
예제 #5
0
 def test_to_bytes(self):
     header = MQTTFixedHeader(PacketType.CONNECT, 0x00, 0)
     data = header.to_bytes()
     self.assertEqual(data, b"\x10\x00")