Пример #1
0
 def test_body_size(self):
     m = b'l\1\0\1\4\0\0\0\1\0\0\0\0\0\0\0b234'
     self.assertEqual(parse_dbus_header(m), len(m))
     for l in range(16, len(m)):
         self.assertEqual(parse_dbus_header(m[:l]), len(m))
Пример #2
0
 def test_padding(self):
     m = b'l\1\0\1\0\0\0\0\1\0\0\0\11\0\0\0h234567812345678'
     self.assertEqual(parse_dbus_header(m), len(m))
     for l in range(16, len(m)):
         self.assertEqual(parse_dbus_header(m[:l]), len(m))
Пример #3
0
 def test_big_endian(self):
     m = b'B\1\0\1\0\0\0\0\0\0\0\1\0\0\0\0'
     self.assertEqual(parse_dbus_header(m), len(m))
Пример #4
0
 def test_header_array(self):
     m = b'l\1\0\1\0\0\0\0\1\0\0\0\10\0\0\0h2345678'
     self.assertEqual(parse_dbus_header(m), len(m))
     for l in range(16, len(m)):
         self.assertEqual(parse_dbus_header(m[:l]), len(m))
Пример #5
0
 def test_simple(self):
     m = b'l\1\0\1\0\0\0\0\1\0\0\0\0\0\0\0'
     self.assertEqual(parse_dbus_header(m), len(m))