21
20
def __getslice__(self, x, y):
22
21
return list(self.array[x:y])
23
def __getitem__(self, n):
24
if isinstance(n, slice):
25
return list(self.array.__getitem__(n))
24
29
def __getattr__(self, attr):
25
30
return getattr(self.array, attr)
27
def __cmp__(self, other):
28
return cmp(self.array.tolist(), other)
32
def __eq__(self, other):
33
return self.array.tolist() == other
35
def __ne__(self, other):
36
return self.array.tolist() != other
30
38
rq.array = CmpArray
33
bin = string.join(map(lambda c: '\\x%02x' % ord(c), bin), '')
41
bin = ''.join(map(lambda c: '\\x%02x' % c, bin))
36
44
for i in range(0, len(bin), 16):
75
83
'border_width': 29625,
78
self.req_bin_0 = '\x01\xc6\x17\x00' '\xa1\x2e\xb9\x25' \
79
'\x30\xfa\x8f\x21' '\x42\xe9\x11\x8d' \
80
'\x1f\xd7\x5b\xf2' '\xb9\x73\x02\x00' \
81
'\x4d\x3e\x64\x30' '\xff\x7f\x00\x00' \
82
'\x58\x2e\x54\x4e' '\x2c\x67\x7e\x2a' \
83
'\x35\x39\xa1\x1e' '\x2c\x60\x60\x51' \
84
'\x06\x00\x00\x00' '\x06\x00\x00\x00' \
85
'\x01\x00\x00\x00' '\xc4\x0f\xc8\x34' \
86
'\x1e\xac\xf5\x64' '\x01\x00\x00\x00' \
87
'\x00\x00\x00\x00' '\x33\x4a\x4c\x35' \
88
'\xc3\x5e\xcd\x27' '\xb9\xb0\x69\x3a' \
86
self.req_bin_0 = b'\x01\xc6\x17\x00' b'\xa1\x2e\xb9\x25' \
87
b'\x30\xfa\x8f\x21' b'\x42\xe9\x11\x8d' \
88
b'\x1f\xd7\x5b\xf2' b'\xb9\x73\x02\x00' \
89
b'\x4d\x3e\x64\x30' b'\xff\x7f\x00\x00' \
90
b'\x58\x2e\x54\x4e' b'\x2c\x67\x7e\x2a' \
91
b'\x35\x39\xa1\x1e' b'\x2c\x60\x60\x51' \
92
b'\x06\x00\x00\x00' b'\x06\x00\x00\x00' \
93
b'\x01\x00\x00\x00' b'\xc4\x0f\xc8\x34' \
94
b'\x1e\xac\xf5\x64' b'\x01\x00\x00\x00' \
95
b'\x00\x00\x00\x00' b'\x33\x4a\x4c\x35' \
96
b'\xc3\x5e\xcd\x27' b'\xb9\xb0\x69\x3a' \
92
100
def testPackRequest0(self):
93
bin = apply(request.CreateWindow._request.to_binary, (), self.req_args_0)
101
bin = request.CreateWindow._request.to_binary(*(), **self.req_args_0)
95
103
assert bin == self.req_bin_0
96
104
except AssertionError:
114
122
'window': 560274578,
115
123
'attrs': {'cursor': 1238338372, 'override_redirect': 0, 'bit_gravity': 6, 'event_mask': 1980992429, 'border_pixel': 310964771, 'background_pixel': 1268171782, 'save_under': 1, 'colormap': 171538239, 'do_not_propagate_mask': 135558419, 'backing_store': 2, 'win_gravity': 10, 'backing_planes': 252687930, 'border_pixmap': 287169917, 'backing_pixel': 1114685309, 'background_pixmap': 2004887498},
117
self.req_bin_0 = '\x02\x00\x12\x00' '\x92\x1c\x65\x21' \
118
'\xff\x7f\x00\x00' '\xca\x27\x80\x77' \
119
'\x06\xc4\x96\x4b' '\x7d\xdd\x1d\x11' \
120
'\x23\xf2\x88\x12' '\x06\x00\x00\x00' \
121
'\x0a\x00\x00\x00' '\x02\x00\x00\x00' \
122
'\x3a\xb6\x0f\x0f' '\x7d\xbf\x70\x42' \
123
'\x00\x00\x00\x00' '\x01\x00\x00\x00' \
124
'\xad\x8b\x13\x76' '\x13\x75\x14\x08' \
125
'\x3f\x77\x39\x0a' '\x44\x8b\xcf\x49'
125
self.req_bin_0 = b'\x02\x00\x12\x00' b'\x92\x1c\x65\x21' \
126
b'\xff\x7f\x00\x00' b'\xca\x27\x80\x77' \
127
b'\x06\xc4\x96\x4b' b'\x7d\xdd\x1d\x11' \
128
b'\x23\xf2\x88\x12' b'\x06\x00\x00\x00' \
129
b'\x0a\x00\x00\x00' b'\x02\x00\x00\x00' \
130
b'\x3a\xb6\x0f\x0f' b'\x7d\xbf\x70\x42' \
131
b'\x00\x00\x00\x00' b'\x01\x00\x00\x00' \
132
b'\xad\x8b\x13\x76' b'\x13\x75\x14\x08' \
133
b'\x3f\x77\x39\x0a' b'\x44\x8b\xcf\x49'
128
136
def testPackRequest0(self):
129
bin = apply(request.ChangeWindowAttributes._request.to_binary, (), self.req_args_0)
137
bin = request.ChangeWindowAttributes._request.to_binary(*(), **self.req_args_0)
131
139
assert bin == self.req_bin_0
132
140
except AssertionError:
441
449
'window': 2092974410,
442
450
'attrs': {'sibling': 1102940930, 'width': 52077, 'y': -11332, 'x': -11514, 'border_width': -6900, 'stack_mode': 4, 'height': 62050},
444
self.req_bin_0 = '\x0c\x00\x0a\x00' '\x4a\x41\xc0\x7c' \
445
'\x7f\x00\x00\x00' '\x06\xd3\x00\x00' \
446
'\xbc\xd3\x00\x00' '\x6d\xcb\x00\x00' \
447
'\x62\xf2\x00\x00' '\x0c\xe5\x00\x00' \
448
'\x02\x8b\xbd\x41' '\x04\x00\x00\x00'
452
self.req_bin_0 = b'\x0c\x00\x0a\x00' b'\x4a\x41\xc0\x7c' \
453
b'\x7f\x00\x00\x00' b'\x06\xd3\x00\x00' \
454
b'\xbc\xd3\x00\x00' b'\x6d\xcb\x00\x00' \
455
b'\x62\xf2\x00\x00' b'\x0c\xe5\x00\x00' \
456
b'\x02\x8b\xbd\x41' b'\x04\x00\x00\x00'
451
459
def testPackRequest0(self):
452
bin = apply(request.ConfigureWindow._request.to_binary, (), self.req_args_0)
460
bin = request.ConfigureWindow._request.to_binary(*(), **self.req_args_0)
454
462
assert bin == self.req_bin_0
455
463
except AssertionError:
568
576
'children': [1089242139, 925689046, 1668140638, 775016596, 1024466546, 1245533043, 1733661379],
569
577
'sequence_number': 10033,
571
self.reply_bin_0 = '\x01\x00\x31\x27' '\x07\x00\x00\x00' \
572
'\x35\xea\xdf\x17' '\x13\xb9\xcd\x29' \
573
'\x07\x00\x00\x00' '\x00\x00\x00\x00' \
574
'\x00\x00\x00\x00' '\x00\x00\x00\x00' \
575
'\x1b\x84\xec\x40' '\xd6\xe4\x2c\x37' \
576
'\x5e\xce\x6d\x63' '\x94\xd0\x31\x2e' \
577
'\x72\x1e\x10\x3d' '\x73\x53\x3d\x4a' \
579
self.reply_bin_0 = b'\x01\x00\x31\x27' b'\x07\x00\x00\x00' \
580
b'\x35\xea\xdf\x17' b'\x13\xb9\xcd\x29' \
581
b'\x07\x00\x00\x00' b'\x00\x00\x00\x00' \
582
b'\x00\x00\x00\x00' b'\x00\x00\x00\x00' \
583
b'\x1b\x84\xec\x40' b'\xd6\xe4\x2c\x37' \
584
b'\x5e\xce\x6d\x63' b'\x94\xd0\x31\x2e' \
585
b'\x72\x1e\x10\x3d' b'\x73\x53\x3d\x4a' \
581
589
def testPackRequest0(self):
582
bin = apply(request.QueryTree._request.to_binary, (), self.req_args_0)
590
bin = request.QueryTree._request.to_binary(*(), **self.req_args_0)
584
592
assert bin == self.req_bin_0
585
593
except AssertionError:
621
629
'name': 'fuzzy_prop',
622
630
'only_if_exists': 0,
624
self.req_bin_0 = '\x10\x00\x05\x00' '\x0a\x00\x00\x00' \
625
'\x66\x75\x7a\x7a' '\x79\x5f\x70\x72' \
632
self.req_bin_0 = b'\x10\x00\x05\x00' b'\x0a\x00\x00\x00' \
633
b'\x66\x75\x7a\x7a' b'\x79\x5f\x70\x72' \
628
636
self.reply_args_0 = {
629
637
'sequence_number': 14401,
630
638
'atom': 1112752381,
632
self.reply_bin_0 = '\x01\x00\x41\x38' '\x00\x00\x00\x00' \
633
'\xfd\x40\x53\x42' '\x00\x00\x00\x00' \
634
'\x00\x00\x00\x00' '\x00\x00\x00\x00' \
635
'\x00\x00\x00\x00' '\x00\x00\x00\x00'
640
self.reply_bin_0 = b'\x01\x00\x41\x38' b'\x00\x00\x00\x00' \
641
b'\xfd\x40\x53\x42' b'\x00\x00\x00\x00' \
642
b'\x00\x00\x00\x00' b'\x00\x00\x00\x00' \
643
b'\x00\x00\x00\x00' b'\x00\x00\x00\x00'
638
646
def testPackRequest0(self):
639
bin = apply(request.InternAtom._request.to_binary, (), self.req_args_0)
647
bin = request.InternAtom._request.to_binary(*(), **self.req_args_0)
641
649
assert bin == self.req_bin_0
642
650
except AssertionError:
677
685
self.req_args_0 = {
678
686
'atom': 1234624354,
680
self.req_bin_0 = '\x11\x00\x02\x00' '\x62\xdf\x96\x49'
688
self.req_bin_0 = b'\x11\x00\x02\x00' b'\x62\xdf\x96\x49'
682
690
self.reply_args_0 = {
683
691
'name': 'WM_CLASS',
684
692
'sequence_number': 2504,
686
self.reply_bin_0 = '\x01\x00\xc8\x09' '\x02\x00\x00\x00' \
687
'\x08\x00\x00\x00' '\x00\x00\x00\x00' \
688
'\x00\x00\x00\x00' '\x00\x00\x00\x00' \
689
'\x00\x00\x00\x00' '\x00\x00\x00\x00' \
690
'\x57\x4d\x5f\x43' '\x4c\x41\x53\x53'
694
self.reply_bin_0 = b'\x01\x00\xc8\x09' b'\x02\x00\x00\x00' \
695
b'\x08\x00\x00\x00' b'\x00\x00\x00\x00' \
696
b'\x00\x00\x00\x00' b'\x00\x00\x00\x00' \
697
b'\x00\x00\x00\x00' b'\x00\x00\x00\x00' \
698
b'\x57\x4d\x5f\x43' b'\x4c\x41\x53\x53'
693
701
def testPackRequest0(self):
694
bin = apply(request.GetAtomName._request.to_binary, (), self.req_args_0)
702
bin = request.GetAtomName._request.to_binary(*(), **self.req_args_0)
696
704
assert bin == self.req_bin_0
697
705
except AssertionError:
1099
1107
'sequence_number': 4347,
1100
1108
'value': (32, [1, 2, 3]),
1102
self.reply_bin_7 = '\x01\x20\xfb\x10' '\x03\x00\x00\x00' \
1103
'\x08\xf7\x2e\x24' '\xd8\xb8\x0e\x63' \
1104
'\x03\x00\x00\x00' '\x00\x00\x00\x00' \
1105
'\x00\x00\x00\x00' '\x00\x00\x00\x00' \
1106
'\x01\x00\x00\x00' '\x02\x00\x00\x00' \
1110
self.reply_bin_7 = b'\x01\x20\xfb\x10' b'\x03\x00\x00\x00' \
1111
b'\x08\xf7\x2e\x24' b'\xd8\xb8\x0e\x63' \
1112
b'\x03\x00\x00\x00' b'\x00\x00\x00\x00' \
1113
b'\x00\x00\x00\x00' b'\x00\x00\x00\x00' \
1114
b'\x01\x00\x00\x00' b'\x02\x00\x00\x00' \
1110
1118
def testPackRequest0(self):
1111
bin = apply(request.GetProperty._request.to_binary, (), self.req_args_0)
1119
bin = request.GetProperty._request.to_binary(*(), **self.req_args_0)
1113
1121
assert bin == self.req_bin_0
1114
1122
except AssertionError:
1275
1283
self.req_args_0 = {
1276
1284
'window': 1002132678,
1278
self.req_bin_0 = '\x15\x00\x02\x00' '\xc6\x54\xbb\x3b'
1286
self.req_bin_0 = b'\x15\x00\x02\x00' b'\xc6\x54\xbb\x3b'
1280
1288
self.reply_args_0 = {
1281
1289
'sequence_number': 58554,
1282
1290
'atoms': [497337753, 1561366096, 1429910722, 371682445, 1693790956, 124266489, 819023111, 1575252239, 1958056613, 76461795, 2044963121, 1187630009, 890357857, 639310702, 1708479530, 336050724, 1163834063, 1164094286, 1626309474, 136351014, 1163110454, 1416739018, 1380223836],
1284
self.reply_bin_0 = '\x01\x00\xba\xe4' '\x17\x00\x00\x00' \
1285
'\x17\x00\x00\x00' '\x00\x00\x00\x00' \
1286
'\x00\x00\x00\x00' '\x00\x00\x00\x00' \
1287
'\x00\x00\x00\x00' '\x00\x00\x00\x00' \
1288
'\x99\xc5\xa4\x1d' '\x50\x8e\x10\x5d' \
1289
'\xc2\xb4\x3a\x55' '\x8d\x6c\x27\x16' \
1290
'\xec\x32\xf5\x64' '\xf9\x27\x68\x07' \
1291
'\x07\x4d\xd1\x30' '\x0f\x71\xe4\x5d' \
1292
'\xa5\x92\xb5\x74' '\xe3\xb6\x8e\x04' \
1293
'\x31\xa9\xe3\x79' '\xb9\xcb\xc9\x46' \
1294
'\x61\xc8\x11\x35' '\x6e\x1b\x1b\x26' \
1295
'\x2a\x54\xd5\x65' '\x24\xba\x07\x14' \
1296
'\xcf\xb2\x5e\x45' '\x4e\xab\x62\x45' \
1297
'\x62\x83\xef\x60' '\x26\x8d\x20\x08' \
1298
'\x36\xa8\x53\x45' '\xca\xb8\x71\x54' \
1292
self.reply_bin_0 = b'\x01\x00\xba\xe4' b'\x17\x00\x00\x00' \
1293
b'\x17\x00\x00\x00' b'\x00\x00\x00\x00' \
1294
b'\x00\x00\x00\x00' b'\x00\x00\x00\x00' \
1295
b'\x00\x00\x00\x00' b'\x00\x00\x00\x00' \
1296
b'\x99\xc5\xa4\x1d' b'\x50\x8e\x10\x5d' \
1297
b'\xc2\xb4\x3a\x55' b'\x8d\x6c\x27\x16' \
1298
b'\xec\x32\xf5\x64' b'\xf9\x27\x68\x07' \
1299
b'\x07\x4d\xd1\x30' b'\x0f\x71\xe4\x5d' \
1300
b'\xa5\x92\xb5\x74' b'\xe3\xb6\x8e\x04' \
1301
b'\x31\xa9\xe3\x79' b'\xb9\xcb\xc9\x46' \
1302
b'\x61\xc8\x11\x35' b'\x6e\x1b\x1b\x26' \
1303
b'\x2a\x54\xd5\x65' b'\x24\xba\x07\x14' \
1304
b'\xcf\xb2\x5e\x45' b'\x4e\xab\x62\x45' \
1305
b'\x62\x83\xef\x60' b'\x26\x8d\x20\x08' \
1306
b'\x36\xa8\x53\x45' b'\xca\xb8\x71\x54' \
1302
1310
def testPackRequest0(self):
1303
bin = apply(request.ListProperties._request.to_binary, (), self.req_args_0)
1311
bin = request.ListProperties._request.to_binary(*(), **self.req_args_0)
1305
1313
assert bin == self.req_bin_0
1306
1314
except AssertionError:
1461
1469
'propagate': 1,
1462
1470
'event': Xlib.protocol.event.Expose(count = 7721, width = 18606, window = 1339231972, y = 45287, x = 46510, type = 12, sequence_number = 0, height = 44735),
1464
self.req_bin_0 = '\x19\x01\x0b\x00' '\xd8\xda\x29\x62' \
1465
'\x50\xdb\xc4\x3a' '\x0c\x00\x00\x00' \
1466
'\xe4\x0e\xd3\x4f' '\xae\xb5\xe7\xb0' \
1467
'\xae\x48\xbf\xae' '\x29\x1e\x00\x00' \
1468
'\x00\x00\x00\x00' '\x00\x00\x00\x00' \
1472
self.req_bin_0 = b'\x19\x01\x0b\x00' b'\xd8\xda\x29\x62' \
1473
b'\x50\xdb\xc4\x3a' b'\x0c\x00\x00\x00' \
1474
b'\xe4\x0e\xd3\x4f' b'\xae\xb5\xe7\xb0' \
1475
b'\xae\x48\xbf\xae' b'\x29\x1e\x00\x00' \
1476
b'\x00\x00\x00\x00' b'\x00\x00\x00\x00' \
1472
1480
def testPackRequest0(self):
1473
bin = apply(request.SendEvent._request.to_binary, (), self.req_args_0)
1481
bin = request.SendEvent._request.to_binary(*(), **self.req_args_0)
1475
1483
assert bin == self.req_bin_0
1476
1484
except AssertionError:
1500
1508
'grab_window': 1295558486,
1501
1509
'owner_events': 1,
1503
self.req_bin_0 = '\x1a\x01\x06\x00' '\x56\xa7\x38\x4d' \
1504
'\x12\x6b\x01\x00' '\xca\xe1\x02\x5b' \
1505
'\xe7\xde\xb2\x69' '\xa7\xfa\x3e\x47'
1511
self.req_bin_0 = b'\x1a\x01\x06\x00' b'\x56\xa7\x38\x4d' \
1512
b'\x12\x6b\x01\x00' b'\xca\xe1\x02\x5b' \
1513
b'\xe7\xde\xb2\x69' b'\xa7\xfa\x3e\x47'
1507
1515
self.reply_args_0 = {
1509
1517
'sequence_number': 9454,
1511
self.reply_bin_0 = '\x01\xa6\xee\x24' '\x00\x00\x00\x00' \
1512
'\x00\x00\x00\x00' '\x00\x00\x00\x00' \
1513
'\x00\x00\x00\x00' '\x00\x00\x00\x00' \
1514
'\x00\x00\x00\x00' '\x00\x00\x00\x00'
1519
self.reply_bin_0 = b'\x01\xa6\xee\x24' b'\x00\x00\x00\x00' \
1520
b'\x00\x00\x00\x00' b'\x00\x00\x00\x00' \
1521
b'\x00\x00\x00\x00' b'\x00\x00\x00\x00' \
1522
b'\x00\x00\x00\x00' b'\x00\x00\x00\x00'
1517
1525
def testPackRequest0(self):
1518
bin = apply(request.GrabPointer._request.to_binary, (), self.req_args_0)
1526
bin = request.GrabPointer._request.to_binary(*(), **self.req_args_0)
1520
1528
assert bin == self.req_bin_0
1521
1529
except AssertionError:
1684
1692
'grab_window': 316814295,
1685
1693
'owner_events': 0,
1687
self.req_bin_0 = '\x1f\x00\x04\x00' '\xd7\x33\xe2\x12' \
1688
'\x93\x11\x1d\x65' '\x00\x01\x00\x00'
1695
self.req_bin_0 = b'\x1f\x00\x04\x00' b'\xd7\x33\xe2\x12' \
1696
b'\x93\x11\x1d\x65' b'\x00\x01\x00\x00'
1690
1698
self.reply_args_0 = {
1692
1700
'sequence_number': 46747,
1694
self.reply_bin_0 = '\x01\xef\x9b\xb6' '\x00\x00\x00\x00' \
1695
'\x00\x00\x00\x00' '\x00\x00\x00\x00' \
1696
'\x00\x00\x00\x00' '\x00\x00\x00\x00' \
1697
'\x00\x00\x00\x00' '\x00\x00\x00\x00'
1702
self.reply_bin_0 = b'\x01\xef\x9b\xb6' b'\x00\x00\x00\x00' \
1703
b'\x00\x00\x00\x00' b'\x00\x00\x00\x00' \
1704
b'\x00\x00\x00\x00' b'\x00\x00\x00\x00' \
1705
b'\x00\x00\x00\x00' b'\x00\x00\x00\x00'
1700
1708
def testPackRequest0(self):
1701
bin = apply(request.GrabKeyboard._request.to_binary, (), self.req_args_0)
1709
bin = request.GrabKeyboard._request.to_binary(*(), **self.req_args_0)
1703
1711
assert bin == self.req_bin_0
1704
1712
except AssertionError:
1972
1980
'window': 528148429,
1973
1981
'stop': 1808786083,
1975
self.req_bin_0 = '\x27\x00\x04\x00' '\xcd\xe7\x7a\x1f' \
1976
'\x7d\xa5\xc9\x7d' '\xa3\xe2\xcf\x6b'
1983
self.req_bin_0 = b'\x27\x00\x04\x00' b'\xcd\xe7\x7a\x1f' \
1984
b'\x7d\xa5\xc9\x7d' b'\xa3\xe2\xcf\x6b'
1978
1986
self.reply_args_0 = {
1979
1987
'events': [{'y': -23108, 'x': -3461, 'time': 984326273}, {'y': -4096, 'x': -4908, 'time': 488459157}, {'y': -29782, 'x': -8325, 'time': 1162935901}, {'y': -26418, 'x': -10559, 'time': 275816904}, {'y': -3941, 'x': -2216, 'time': 656439277}],
1980
1988
'sequence_number': 42652,
1982
self.reply_bin_0 = '\x01\x00\x9c\xa6' '\x0a\x00\x00\x00' \
1983
'\x05\x00\x00\x00' '\x00\x00\x00\x00' \
1984
'\x00\x00\x00\x00' '\x00\x00\x00\x00' \
1985
'\x00\x00\x00\x00' '\x00\x00\x00\x00' \
1986
'\x81\xa0\xab\x3a' '\x7b\xf2\xbc\xa5' \
1987
'\x95\x4b\x1d\x1d' '\xd4\xec\x00\xf0' \
1988
'\x5d\xfe\x50\x45' '\x7b\xdf\xaa\x8b' \
1989
'\xc8\xa1\x70\x10' '\xc1\xd6\xce\x98' \
1990
'\xed\x77\x20\x27' '\x58\xf7\x9b\xf0'
1990
self.reply_bin_0 = b'\x01\x00\x9c\xa6' b'\x0a\x00\x00\x00' \
1991
b'\x05\x00\x00\x00' b'\x00\x00\x00\x00' \
1992
b'\x00\x00\x00\x00' b'\x00\x00\x00\x00' \
1993
b'\x00\x00\x00\x00' b'\x00\x00\x00\x00' \
1994
b'\x81\xa0\xab\x3a' b'\x7b\xf2\xbc\xa5' \
1995
b'\x95\x4b\x1d\x1d' b'\xd4\xec\x00\xf0' \
1996
b'\x5d\xfe\x50\x45' b'\x7b\xdf\xaa\x8b' \
1997
b'\xc8\xa1\x70\x10' b'\xc1\xd6\xce\x98' \
1998
b'\xed\x77\x20\x27' b'\x58\xf7\x9b\xf0'
1993
2001
def testPackRequest0(self):
1994
bin = apply(request.GetMotionEvents._request.to_binary, (), self.req_args_0)
2002
bin = request.GetMotionEvents._request.to_binary(*(), **self.req_args_0)
1996
2004
assert bin == self.req_bin_0
1997
2005
except AssertionError:
2212
2220
def setUp(self):
2213
2221
self.req_args_0 = {
2215
self.req_bin_0 = '\x2c\x00\x01\x00'
2223
self.req_bin_0 = b'\x2c\x00\x01\x00'
2217
2225
self.reply_args_0 = {
2218
2226
'map': [175, 212, 207, 139, 156, 192, 230, 219, 136, 198, 152, 156, 229, 233, 221, 209, 131, 229, 209, 249, 130, 189, 183, 135, 238, 149, 131, 204, 162, 229, 149, 246],
2219
2227
'sequence_number': 19383,
2221
self.reply_bin_0 = '\x01\x00\xb7\x4b' '\x02\x00\x00\x00' \
2222
'\xaf\xd4\xcf\x8b' '\x9c\xc0\xe6\xdb' \
2223
'\x88\xc6\x98\x9c' '\xe5\xe9\xdd\xd1' \
2224
'\x83\xe5\xd1\xf9' '\x82\xbd\xb7\x87' \
2225
'\xee\x95\x83\xcc' '\xa2\xe5\x95\xf6'
2229
self.reply_bin_0 = b'\x01\x00\xb7\x4b' b'\x02\x00\x00\x00' \
2230
b'\xaf\xd4\xcf\x8b' b'\x9c\xc0\xe6\xdb' \
2231
b'\x88\xc6\x98\x9c' b'\xe5\xe9\xdd\xd1' \
2232
b'\x83\xe5\xd1\xf9' b'\x82\xbd\xb7\x87' \
2233
b'\xee\x95\x83\xcc' b'\xa2\xe5\x95\xf6'
2228
2236
def testPackRequest0(self):
2229
bin = apply(request.QueryKeymap._request.to_binary, (), self.req_args_0)
2237
bin = request.QueryKeymap._request.to_binary(*(), **self.req_args_0)
2231
2239
assert bin == self.req_bin_0
2232
2240
except AssertionError:
2342
2350
'properties': [{'name': 515636466, 'value': 1798456662}],
2343
2351
'sequence_number': 52469,
2345
self.reply_bin_0 = '\x01\x00\xf5\xcc' '\x12\x00\x00\x00' \
2346
'\x29\xe0\xf8\x83' '\x64\xb3\x6c\xd9' \
2347
'\x6d\x8f\xba\xcd' '\x00\x00\x00\x00' \
2348
'\x2e\x95\x2f\x8c' '\x59\xe8\x36\xed' \
2349
'\xfa\xca\x2d\xe3' '\x00\x00\x00\x00' \
2350
'\x08\xd1\x0a\xbd' '\x13\x6f\x01\x00' \
2351
'\xa5\xc3\xdb\x00' '\x1a\xc2\x6f\xfc' \
2352
'\x03\x00\x00\x00' '\xf2\xfc\xbb\x1e' \
2353
'\x56\x45\x32\x6b' '\xfe\xae\x3f\xf5' \
2354
'\x3d\xd0\xc7\xc9' '\x40\xc4\xfb\xfb' \
2355
'\xfe\xd5\x51\xda' '\x09\x97\x23\xd4' \
2356
'\xa7\xf9\xa8\x74' '\x8e\x87\xaf\x93' \
2357
'\x65\xef\x49\xd0' '\x50\xbe\x82\xde'
2353
self.reply_bin_0 = b'\x01\x00\xf5\xcc' b'\x12\x00\x00\x00' \
2354
b'\x29\xe0\xf8\x83' b'\x64\xb3\x6c\xd9' \
2355
b'\x6d\x8f\xba\xcd' b'\x00\x00\x00\x00' \
2356
b'\x2e\x95\x2f\x8c' b'\x59\xe8\x36\xed' \
2357
b'\xfa\xca\x2d\xe3' b'\x00\x00\x00\x00' \
2358
b'\x08\xd1\x0a\xbd' b'\x13\x6f\x01\x00' \
2359
b'\xa5\xc3\xdb\x00' b'\x1a\xc2\x6f\xfc' \
2360
b'\x03\x00\x00\x00' b'\xf2\xfc\xbb\x1e' \
2361
b'\x56\x45\x32\x6b' b'\xfe\xae\x3f\xf5' \
2362
b'\x3d\xd0\xc7\xc9' b'\x40\xc4\xfb\xfb' \
2363
b'\xfe\xd5\x51\xda' b'\x09\x97\x23\xd4' \
2364
b'\xa7\xf9\xa8\x74' b'\x8e\x87\xaf\x93' \
2365
b'\x65\xef\x49\xd0' b'\x50\xbe\x82\xde'
2360
2368
def testPackRequest0(self):
2361
bin = apply(request.QueryFont._request.to_binary, (), self.req_args_0)
2369
bin = request.QueryFont._request.to_binary(*(), **self.req_args_0)
2363
2371
assert bin == self.req_bin_0
2364
2372
except AssertionError:
2463
2471
'pattern': 'bhazr',
2464
2472
'max_names': 57427,
2466
self.req_bin_0 = '\x31\x00\x04\x00' '\x53\xe0\x05\x00' \
2467
'\x62\x68\x61\x7a' '\x72\x00\x00\x00'
2474
self.req_bin_0 = b'\x31\x00\x04\x00' b'\x53\xe0\x05\x00' \
2475
b'\x62\x68\x61\x7a' b'\x72\x00\x00\x00'
2469
2477
self.reply_args_0 = {
2470
2478
'fonts': ['fie', 'fuzzy', 'foozooom'],
2471
2479
'sequence_number': 39409,
2473
self.reply_bin_0 = '\x01\x00\xf1\x99' '\x05\x00\x00\x00' \
2474
'\x03\x00\x00\x00' '\x00\x00\x00\x00' \
2475
'\x00\x00\x00\x00' '\x00\x00\x00\x00' \
2476
'\x00\x00\x00\x00' '\x00\x00\x00\x00' \
2477
'\x03\x66\x69\x65' '\x05\x66\x75\x7a' \
2478
'\x7a\x79\x08\x66' '\x6f\x6f\x7a\x6f' \
2481
self.reply_bin_0 = b'\x01\x00\xf1\x99' b'\x05\x00\x00\x00' \
2482
b'\x03\x00\x00\x00' b'\x00\x00\x00\x00' \
2483
b'\x00\x00\x00\x00' b'\x00\x00\x00\x00' \
2484
b'\x00\x00\x00\x00' b'\x00\x00\x00\x00' \
2485
b'\x03\x66\x69\x65' b'\x05\x66\x75\x7a' \
2486
b'\x7a\x79\x08\x66' b'\x6f\x6f\x7a\x6f' \
2482
2490
def testPackRequest0(self):
2483
bin = apply(request.ListFonts._request.to_binary, (), self.req_args_0)
2491
bin = request.ListFonts._request.to_binary(*(), **self.req_args_0)
2485
2493
assert bin == self.req_bin_0
2486
2494
except AssertionError:
2542
2550
'properties': [{'name': 213588122, 'value': 1789263183}],
2543
2551
'sequence_number': 43812,
2545
self.reply_bin_0 = '\x01\x08\x24\xab' '\x0b\x00\x00\x00' \
2546
'\x62\xdf\x86\xb3' '\x5f\xae\x0c\xd9' \
2547
'\xc4\xbd\xd8\x6a' '\x00\x00\x00\x00' \
2548
'\xd9\xdb\x9c\xe5' '\x92\xee\x37\xf2' \
2549
'\x3f\x99\xbc\xbf' '\x00\x00\x00\x00' \
2550
'\x45\xfe\x72\xb0' '\x6b\x98\x01\x00' \
2551
'\xe5\x9e\xdd\x01' '\xce\x96\x37\x9e' \
2552
'\x27\x6f\x9c\x68' '\x9a\x18\xbb\x0c' \
2553
'\x4f\xfd\xa5\x6a' '\x66\x6f\x6e\x74' \
2553
self.reply_bin_0 = b'\x01\x08\x24\xab' b'\x0b\x00\x00\x00' \
2554
b'\x62\xdf\x86\xb3' b'\x5f\xae\x0c\xd9' \
2555
b'\xc4\xbd\xd8\x6a' b'\x00\x00\x00\x00' \
2556
b'\xd9\xdb\x9c\xe5' b'\x92\xee\x37\xf2' \
2557
b'\x3f\x99\xbc\xbf' b'\x00\x00\x00\x00' \
2558
b'\x45\xfe\x72\xb0' b'\x6b\x98\x01\x00' \
2559
b'\xe5\x9e\xdd\x01' b'\xce\x96\x37\x9e' \
2560
b'\x27\x6f\x9c\x68' b'\x9a\x18\xbb\x0c' \
2561
b'\x4f\xfd\xa5\x6a' b'\x66\x6f\x6e\x74' \
2557
2565
def testPackRequest0(self):
2558
bin = apply(request.ListFontsWithInfo._request.to_binary, (), self.req_args_0)
2566
bin = request.ListFontsWithInfo._request.to_binary(*(), **self.req_args_0)
2560
2568
assert bin == self.req_bin_0
2561
2569
except AssertionError:
2647
2655
def setUp(self):
2648
2656
self.req_args_0 = {
2650
self.req_bin_0 = '\x34\x00\x01\x00'
2658
self.req_bin_0 = b'\x34\x00\x01\x00'
2652
2660
self.reply_args_0 = {
2653
2661
'paths': ['path1', 'path2232'],
2654
2662
'sequence_number': 17086,
2656
self.reply_bin_0 = '\x01\x00\xbe\x42' '\x04\x00\x00\x00' \
2657
'\x02\x00\x00\x00' '\x00\x00\x00\x00' \
2658
'\x00\x00\x00\x00' '\x00\x00\x00\x00' \
2659
'\x00\x00\x00\x00' '\x00\x00\x00\x00' \
2660
'\x05\x70\x61\x74' '\x68\x31\x08\x70' \
2661
'\x61\x74\x68\x32' '\x32\x33\x32\x00'
2664
self.reply_bin_0 = b'\x01\x00\xbe\x42' b'\x04\x00\x00\x00' \
2665
b'\x02\x00\x00\x00' b'\x00\x00\x00\x00' \
2666
b'\x00\x00\x00\x00' b'\x00\x00\x00\x00' \
2667
b'\x00\x00\x00\x00' b'\x00\x00\x00\x00' \
2668
b'\x05\x70\x61\x74' b'\x68\x31\x08\x70' \
2669
b'\x61\x74\x68\x32' b'\x32\x33\x32\x00'
2663
2671
self.reply_args_1 = {
2665
2673
'sequence_number': 8511,
2667
self.reply_bin_1 = '\x01\x00\x3f\x21' '\x00\x00\x00\x00' \
2668
'\x00\x00\x00\x00' '\x00\x00\x00\x00' \
2669
'\x00\x00\x00\x00' '\x00\x00\x00\x00' \
2670
'\x00\x00\x00\x00' '\x00\x00\x00\x00'
2675
self.reply_bin_1 = b'\x01\x00\x3f\x21' b'\x00\x00\x00\x00' \
2676
b'\x00\x00\x00\x00' b'\x00\x00\x00\x00' \
2677
b'\x00\x00\x00\x00' b'\x00\x00\x00\x00' \
2678
b'\x00\x00\x00\x00' b'\x00\x00\x00\x00'
2673
2681
def testPackRequest0(self):
2674
bin = apply(request.GetFontPath._request.to_binary, (), self.req_args_0)
2682
bin = request.GetFontPath._request.to_binary(*(), **self.req_args_0)
2676
2684
assert bin == self.req_bin_0
2677
2685
except AssertionError:
2791
2799
'attrs': {'function': 14, 'foreground': 814230008, 'background': 2072616911, 'clip_x_origin': -6987, 'subwindow_mode': 0, 'cap_style': 1, 'fill_style': 3, 'tile_stipple_y_origin': -25870, 'font': 264499208, 'graphics_exposures': 0, 'join_style': 2, 'line_width': 36600, 'stipple': 870974399, 'dash_offset': 49599, 'clip_y_origin': -5712, 'tile_stipple_x_origin': -32365, 'arc_mode': 0, 'tile': 1597988019, 'line_style': 2, 'plane_mask': 1650697305, 'clip_mask': 402937862, 'fill_rule': 0, 'dashes': 136},
2792
2800
'cid': 779296774,
2794
self.req_bin_0 = '\x37\x00\x1b\x00' '\x06\x20\x73\x2e' \
2795
'\xb2\x9b\x7c\x31' '\xff\xff\x7f\x00' \
2796
'\x0e\x00\x00\x00' '\x59\xa4\x63\x62' \
2797
'\xf8\x29\x88\x30' '\xcf\x9f\x89\x7b' \
2798
'\xf8\x8e\x00\x00' '\x02\x00\x00\x00' \
2799
'\x01\x00\x00\x00' '\x02\x00\x00\x00' \
2800
'\x03\x00\x00\x00' '\x00\x00\x00\x00' \
2801
'\xb3\x5c\x3f\x5f' '\xbf\x03\xea\x33' \
2802
'\x93\x81\x00\x00' '\xf2\x9a\x00\x00' \
2803
'\x08\xf0\xc3\x0f' '\x00\x00\x00\x00' \
2804
'\x00\x00\x00\x00' '\xb5\xe4\x00\x00' \
2805
'\xb0\xe9\x00\x00' '\x06\x58\x04\x18' \
2806
'\xbf\xc1\x00\x00' '\x88\x00\x00\x00' \
2802
self.req_bin_0 = b'\x37\x00\x1b\x00' b'\x06\x20\x73\x2e' \
2803
b'\xb2\x9b\x7c\x31' b'\xff\xff\x7f\x00' \
2804
b'\x0e\x00\x00\x00' b'\x59\xa4\x63\x62' \
2805
b'\xf8\x29\x88\x30' b'\xcf\x9f\x89\x7b' \
2806
b'\xf8\x8e\x00\x00' b'\x02\x00\x00\x00' \
2807
b'\x01\x00\x00\x00' b'\x02\x00\x00\x00' \
2808
b'\x03\x00\x00\x00' b'\x00\x00\x00\x00' \
2809
b'\xb3\x5c\x3f\x5f' b'\xbf\x03\xea\x33' \
2810
b'\x93\x81\x00\x00' b'\xf2\x9a\x00\x00' \
2811
b'\x08\xf0\xc3\x0f' b'\x00\x00\x00\x00' \
2812
b'\x00\x00\x00\x00' b'\xb5\xe4\x00\x00' \
2813
b'\xb0\xe9\x00\x00' b'\x06\x58\x04\x18' \
2814
b'\xbf\xc1\x00\x00' b'\x88\x00\x00\x00' \
2810
2818
def testPackRequest0(self):
2811
bin = apply(request.CreateGC._request.to_binary, (), self.req_args_0)
2819
bin = request.CreateGC._request.to_binary(*(), **self.req_args_0)
2813
2821
assert bin == self.req_bin_0
2814
2822
except AssertionError:
2832
2840
'gc': 1996372624,
2833
2841
'attrs': {'function': 15, 'foreground': 1817174045, 'background': 840850119, 'clip_x_origin': -28415, 'subwindow_mode': 1, 'cap_style': 0, 'fill_style': 0, 'tile_stipple_y_origin': -24832, 'font': 240535139, 'graphics_exposures': 1, 'join_style': 2, 'line_width': 64290, 'stipple': 1739313208, 'dash_offset': 53189, 'clip_y_origin': -2802, 'tile_stipple_x_origin': -4548, 'arc_mode': 1, 'tile': 1091199324, 'line_style': 2, 'plane_mask': 1403123174, 'clip_mask': 1604118463, 'fill_rule': 1, 'dashes': 186},
2835
self.req_bin_0 = '\x38\x00\x1a\x00' '\x90\x3a\xfe\x76' \
2836
'\xff\xff\x7f\x00' '\x0f\x00\x00\x00' \
2837
'\xe6\xf5\xa1\x53' '\x1d\xe0\x4f\x6c' \
2838
'\xc7\x5a\x1e\x32' '\x22\xfb\x00\x00' \
2839
'\x02\x00\x00\x00' '\x00\x00\x00\x00' \
2840
'\x02\x00\x00\x00' '\x00\x00\x00\x00' \
2841
'\x01\x00\x00\x00' '\x5c\x61\x0a\x41' \
2842
'\x38\xd0\xab\x67' '\x3c\xee\x00\x00' \
2843
'\x00\x9f\x00\x00' '\x63\x46\x56\x0e' \
2844
'\x01\x00\x00\x00' '\x01\x00\x00\x00' \
2845
'\x01\x91\x00\x00' '\x0e\xf5\x00\x00' \
2846
'\xbf\xe7\x9c\x5f' '\xc5\xcf\x00\x00' \
2847
'\xba\x00\x00\x00' '\x01\x00\x00\x00'
2843
self.req_bin_0 = b'\x38\x00\x1a\x00' b'\x90\x3a\xfe\x76' \
2844
b'\xff\xff\x7f\x00' b'\x0f\x00\x00\x00' \
2845
b'\xe6\xf5\xa1\x53' b'\x1d\xe0\x4f\x6c' \
2846
b'\xc7\x5a\x1e\x32' b'\x22\xfb\x00\x00' \
2847
b'\x02\x00\x00\x00' b'\x00\x00\x00\x00' \
2848
b'\x02\x00\x00\x00' b'\x00\x00\x00\x00' \
2849
b'\x01\x00\x00\x00' b'\x5c\x61\x0a\x41' \
2850
b'\x38\xd0\xab\x67' b'\x3c\xee\x00\x00' \
2851
b'\x00\x9f\x00\x00' b'\x63\x46\x56\x0e' \
2852
b'\x01\x00\x00\x00' b'\x01\x00\x00\x00' \
2853
b'\x01\x91\x00\x00' b'\x0e\xf5\x00\x00' \
2854
b'\xbf\xe7\x9c\x5f' b'\xc5\xcf\x00\x00' \
2855
b'\xba\x00\x00\x00' b'\x01\x00\x00\x00'
2850
2858
def testPackRequest0(self):
2851
bin = apply(request.ChangeGC._request.to_binary, (), self.req_args_0)
2859
bin = request.ChangeGC._request.to_binary(*(), **self.req_args_0)
2853
2861
assert bin == self.req_bin_0
2854
2862
except AssertionError:
3166
3174
'points': [{'y': -22360, 'x': -25237}, {'y': -21145, 'x': -28948}, {'y': -16928, 'x': -3515}, {'y': -25838, 'x': -12335}, {'y': -31134, 'x': -12944}],
3167
3175
'gc': 1308624032,
3169
self.req_bin_0 = '\x41\x01\x08\x00' '\x3f\xf4\xc1\x50' \
3170
'\xa0\x04\x00\x4e' '\x6b\x9d\xa8\xa8' \
3171
'\xec\x8e\x67\xad' '\x45\xf2\xe0\xbd' \
3172
'\xd1\xcf\x12\x9b' '\x70\xcd\x62\x86'
3177
self.req_bin_0 = b'\x41\x01\x08\x00' b'\x3f\xf4\xc1\x50' \
3178
b'\xa0\x04\x00\x4e' b'\x6b\x9d\xa8\xa8' \
3179
b'\xec\x8e\x67\xad' b'\x45\xf2\xe0\xbd' \
3180
b'\xd1\xcf\x12\x9b' b'\x70\xcd\x62\x86'
3175
3183
def testPackRequest0(self):
3176
bin = apply(request.PolyLine._request.to_binary, (), self.req_args_0)
3184
bin = request.PolyLine._request.to_binary(*(), **self.req_args_0)
3178
3186
assert bin == self.req_bin_0
3179
3187
except AssertionError:
3229
3237
'drawable': 2136753875,
3230
3238
'rectangles': [{'y': -29358, 'x': -6957, 'height': 19230, 'width': 32377}, {'y': -23694, 'x': -2777, 'height': 48827, 'width': 42548}, {'y': -22773, 'x': -12641, 'height': 9809, 'width': 30955}],
3232
self.req_bin_0 = '\x43\x00\x09\x00' '\xd3\x46\x5c\x7f' \
3233
'\x93\xd8\xc5\x3d' '\xd3\xe4\x52\x8d' \
3234
'\x79\x7e\x1e\x4b' '\x27\xf5\x72\xa3' \
3235
'\x34\xa6\xbb\xbe' '\x9f\xce\x0b\xa7' \
3240
self.req_bin_0 = b'\x43\x00\x09\x00' b'\xd3\x46\x5c\x7f' \
3241
b'\x93\xd8\xc5\x3d' b'\xd3\xe4\x52\x8d' \
3242
b'\x79\x7e\x1e\x4b' b'\x27\xf5\x72\xa3' \
3243
b'\x34\xa6\xbb\xbe' b'\x9f\xce\x0b\xa7' \
3239
3247
def testPackRequest0(self):
3240
bin = apply(request.PolyRectangle._request.to_binary, (), self.req_args_0)
3248
bin = request.PolyRectangle._request.to_binary(*(), **self.req_args_0)
3242
3250
assert bin == self.req_bin_0
3243
3251
except AssertionError:
3262
3270
'gc': 956699423,
3263
3271
'arcs': [{'width': 36714, 'angle1': -22260, 'angle2': -28493, 'y': -394, 'x': -6756, 'height': 63498}, {'width': 31212, 'angle1': -5166, 'angle2': -19039, 'y': -11179, 'x': -20569, 'height': 27113}, {'width': 62033, 'angle1': -18595, 'angle2': -26291, 'y': -8396, 'x': -7987, 'height': 11428}],
3265
self.req_bin_0 = '\x44\x00\x0c\x00' '\x96\x82\x2c\x7b' \
3266
'\x1f\x13\x06\x39' '\x9c\xe5\x76\xfe' \
3267
'\x6a\x8f\x0a\xf8' '\x0c\xa9\xb3\x90' \
3268
'\xa7\xaf\x55\xd4' '\xec\x79\xe9\x69' \
3269
'\xd2\xeb\xa1\xb5' '\xcd\xe0\x34\xdf' \
3270
'\x51\xf2\xa4\x2c' '\x5d\xb7\x4d\x99'
3273
self.req_bin_0 = b'\x44\x00\x0c\x00' b'\x96\x82\x2c\x7b' \
3274
b'\x1f\x13\x06\x39' b'\x9c\xe5\x76\xfe' \
3275
b'\x6a\x8f\x0a\xf8' b'\x0c\xa9\xb3\x90' \
3276
b'\xa7\xaf\x55\xd4' b'\xec\x79\xe9\x69' \
3277
b'\xd2\xeb\xa1\xb5' b'\xcd\xe0\x34\xdf' \
3278
b'\x51\xf2\xa4\x2c' b'\x5d\xb7\x4d\x99'
3273
3281
def testPackRequest0(self):
3274
bin = apply(request.PolyArc._request.to_binary, (), self.req_args_0)
3282
bin = request.PolyArc._request.to_binary(*(), **self.req_args_0)
3276
3284
assert bin == self.req_bin_0
3277
3285
except AssertionError:
3447
3455
'visual': 141686402,
3448
3456
'sequence_number': 47197,
3450
self.reply_bin_0 = '\x01\xf9\x5d\xb8' '\x07\x00\x00\x00' \
3451
'\x82\xf6\x71\x08' '\x00\x00\x00\x00' \
3452
'\x00\x00\x00\x00' '\x00\x00\x00\x00' \
3453
'\x00\x00\x00\x00' '\x00\x00\x00\x00' \
3454
'\x74\x68\x69\x73' '\x20\x69\x73\x20' \
3455
'\x72\x65\x61\x6c' '\x20\x6c\x79\x20' \
3456
'\x69\x6d\x61\x67' '\x20\x65\x20\x62' \
3458
self.reply_bin_0 = b'\x01\xf9\x5d\xb8' b'\x07\x00\x00\x00' \
3459
b'\x82\xf6\x71\x08' b'\x00\x00\x00\x00' \
3460
b'\x00\x00\x00\x00' b'\x00\x00\x00\x00' \
3461
b'\x00\x00\x00\x00' b'\x00\x00\x00\x00' \
3462
b'\x74\x68\x69\x73' b'\x20\x69\x73\x20' \
3463
b'\x72\x65\x61\x6c' b'\x20\x6c\x79\x20' \
3464
b'\x69\x6d\x61\x67' b'\x20\x65\x20\x62' \
3460
3468
def testPackRequest0(self):
3461
bin = apply(request.GetImage._request.to_binary, (), self.req_args_0)
3469
bin = request.GetImage._request.to_binary(*(), **self.req_args_0)
3463
3471
assert bin == self.req_bin_0
3464
3472
except AssertionError:
3604
3612
'gc': 145495998,
3605
3613
'string': (115, 104, 111, 119, 109, 111, 114, 101),
3607
self.req_bin_0 = '\x4d\x08\x08\x00' '\x96\xa8\xff\x55' \
3608
'\xbe\x17\xac\x08' '\xe1\xf4\xce\xfb' \
3609
'\x00\x73\x00\x68' '\x00\x6f\x00\x77' \
3610
'\x00\x6d\x00\x6f' '\x00\x72\x00\x65'
3615
self.req_bin_0 = b'\x4d\x08\x08\x00' b'\x96\xa8\xff\x55' \
3616
b'\xbe\x17\xac\x08' b'\xe1\xf4\xce\xfb' \
3617
b'\x00\x73\x00\x68' b'\x00\x6f\x00\x77' \
3618
b'\x00\x6d\x00\x6f' b'\x00\x72\x00\x65'
3613
3621
def testPackRequest0(self):
3614
bin = apply(request.ImageText16._request.to_binary, (), self.req_args_0)
3622
bin = request.ImageText16._request.to_binary(*(), **self.req_args_0)
3616
3624
assert bin == self.req_bin_0
3617
3625
except AssertionError:
3775
3783
self.req_args_0 = {
3776
3784
'window': 198767900,
3778
self.req_bin_0 = '\x53\x00\x02\x00' '\x1c\xf5\xd8\x0b'
3786
self.req_bin_0 = b'\x53\x00\x02\x00' b'\x1c\xf5\xd8\x0b'
3780
3788
self.reply_args_0 = {
3781
3789
'cmaps': [6854304, 441133660],
3782
3790
'sequence_number': 56438,
3784
self.reply_bin_0 = '\x01\x00\x76\xdc' '\x02\x00\x00\x00' \
3785
'\x02\x00\x00\x00' '\x00\x00\x00\x00' \
3786
'\x00\x00\x00\x00' '\x00\x00\x00\x00' \
3787
'\x00\x00\x00\x00' '\x00\x00\x00\x00' \
3788
'\xa0\x96\x68\x00' '\x5c\x2a\x4b\x1a'
3792
self.reply_bin_0 = b'\x01\x00\x76\xdc' b'\x02\x00\x00\x00' \
3793
b'\x02\x00\x00\x00' b'\x00\x00\x00\x00' \
3794
b'\x00\x00\x00\x00' b'\x00\x00\x00\x00' \
3795
b'\x00\x00\x00\x00' b'\x00\x00\x00\x00' \
3796
b'\xa0\x96\x68\x00' b'\x5c\x2a\x4b\x1a'
3791
3799
def testPackRequest0(self):
3792
bin = apply(request.ListInstalledColormaps._request.to_binary, (), self.req_args_0)
3800
bin = request.ListInstalledColormaps._request.to_binary(*(), **self.req_args_0)
3794
3802
assert bin == self.req_bin_0
3795
3803
except AssertionError:
3957
3965
'colors': 16292,
3958
3966
'planes': 14978,
3960
self.req_bin_0 = '\x56\x01\x03\x00' '\xb5\xe9\x73\x7b' \
3968
self.req_bin_0 = b'\x56\x01\x03\x00' b'\xb5\xe9\x73\x7b' \
3963
3971
self.reply_args_0 = {
3964
3972
'pixels': [1664874569, 198876857, 135035151, 1499807858, 600240169, 1403510863, 757170725, 929995606, 155550883, 642439566, 971734621, 1359474267, 609593319, 669993327, 1837906914, 1355959290, 835285748],
3965
3973
'masks': [50898278, 362272940, 1106373487],
3966
3974
'sequence_number': 57786,
3968
self.reply_bin_0 = '\x01\x00\xba\xe1' '\x14\x00\x00\x00' \
3969
'\x11\x00\x03\x00' '\x00\x00\x00\x00' \
3970
'\x00\x00\x00\x00' '\x00\x00\x00\x00' \
3971
'\x00\x00\x00\x00' '\x00\x00\x00\x00' \
3972
'\x49\xf8\x3b\x63' '\xb9\x9e\xda\x0b' \
3973
'\x0f\x79\x0c\x08' '\x72\x40\x65\x59' \
3974
'\x29\xf0\xc6\x23' '\x4f\xe0\xa7\x53' \
3975
'\x25\x82\x21\x2d' '\x56\x9b\x6e\x37' \
3976
'\xa3\x84\x45\x09' '\x8e\xd9\x4a\x26' \
3977
'\x5d\x7e\xeb\x39' '\x5b\xee\x07\x51' \
3978
'\xe7\xa7\x55\x24' '\x6f\x49\xef\x27' \
3979
'\xe2\x3b\x8c\x6d' '\xfa\x4b\xd2\x50' \
3980
'\xf4\x72\xc9\x31' '\x66\xa5\x08\x03' \
3981
'\xac\xd8\x97\x15' '\x6f\xeb\xf1\x41'
3976
self.reply_bin_0 = b'\x01\x00\xba\xe1' b'\x14\x00\x00\x00' \
3977
b'\x11\x00\x03\x00' b'\x00\x00\x00\x00' \
3978
b'\x00\x00\x00\x00' b'\x00\x00\x00\x00' \
3979
b'\x00\x00\x00\x00' b'\x00\x00\x00\x00' \
3980
b'\x49\xf8\x3b\x63' b'\xb9\x9e\xda\x0b' \
3981
b'\x0f\x79\x0c\x08' b'\x72\x40\x65\x59' \
3982
b'\x29\xf0\xc6\x23' b'\x4f\xe0\xa7\x53' \
3983
b'\x25\x82\x21\x2d' b'\x56\x9b\x6e\x37' \
3984
b'\xa3\x84\x45\x09' b'\x8e\xd9\x4a\x26' \
3985
b'\x5d\x7e\xeb\x39' b'\x5b\xee\x07\x51' \
3986
b'\xe7\xa7\x55\x24' b'\x6f\x49\xef\x27' \
3987
b'\xe2\x3b\x8c\x6d' b'\xfa\x4b\xd2\x50' \
3988
b'\xf4\x72\xc9\x31' b'\x66\xa5\x08\x03' \
3989
b'\xac\xd8\x97\x15' b'\x6f\xeb\xf1\x41'
3983
3991
self.reply_args_1 = {
3986
3994
'sequence_number': 49324,
3988
self.reply_bin_1 = '\x01\x00\xac\xc0' '\x00\x00\x00\x00' \
3989
'\x00\x00\x00\x00' '\x00\x00\x00\x00' \
3990
'\x00\x00\x00\x00' '\x00\x00\x00\x00' \
3991
'\x00\x00\x00\x00' '\x00\x00\x00\x00'
3996
self.reply_bin_1 = b'\x01\x00\xac\xc0' b'\x00\x00\x00\x00' \
3997
b'\x00\x00\x00\x00' b'\x00\x00\x00\x00' \
3998
b'\x00\x00\x00\x00' b'\x00\x00\x00\x00' \
3999
b'\x00\x00\x00\x00' b'\x00\x00\x00\x00'
3994
4002
def testPackRequest0(self):
3995
bin = apply(request.AllocColorCells._request.to_binary, (), self.req_args_0)
4003
bin = request.AllocColorCells._request.to_binary(*(), **self.req_args_0)
3997
4005
assert bin == self.req_bin_0
3998
4006
except AssertionError:
4066
4074
'sequence_number': 17565,
4067
4075
'green_mask': 1072565720,
4069
self.reply_bin_0 = '\x01\x00\x9d\x44' '\x04\x00\x00\x00' \
4070
'\x04\x00\x00\x00' '\x7c\x8a\x7f\x37' \
4071
'\xd8\x0d\xee\x3f' '\x22\x6f\x22\x34' \
4072
'\x00\x00\x00\x00' '\x00\x00\x00\x00' \
4073
'\xc1\x6a\xe4\x63' '\x4c\x82\xa2\x4a' \
4074
'\x37\x09\x41\x02' '\x4a\xdf\xc6\x57'
4077
self.reply_bin_0 = b'\x01\x00\x9d\x44' b'\x04\x00\x00\x00' \
4078
b'\x04\x00\x00\x00' b'\x7c\x8a\x7f\x37' \
4079
b'\xd8\x0d\xee\x3f' b'\x22\x6f\x22\x34' \
4080
b'\x00\x00\x00\x00' b'\x00\x00\x00\x00' \
4081
b'\xc1\x6a\xe4\x63' b'\x4c\x82\xa2\x4a' \
4082
b'\x37\x09\x41\x02' b'\x4a\xdf\xc6\x57'
4077
4085
def testPackRequest0(self):
4078
bin = apply(request.AllocColorPlanes._request.to_binary, (), self.req_args_0)
4086
bin = request.AllocColorPlanes._request.to_binary(*(), **self.req_args_0)
4080
4088
assert bin == self.req_bin_0
4081
4089
except AssertionError:
4118
4126
'plane_mask': 1074378407,
4119
4127
'pixels': [2014216051, 1664038241, 1220941033, 1378294408, 197757808, 793595544, 1289781247, 713684847, 1724469541, 1432124373, 1426727603, 1787792301, 406458839, 1918513211, 441394489, 988895943, 146997744],
4121
self.req_bin_0 = '\x58\x00\x14\x00' '\x1e\xdf\xf2\x01' \
4122
'\xa7\xb6\x09\x40' '\x73\x7f\x0e\x78' \
4123
'\x61\x35\x2f\x63' '\xe9\x14\xc6\x48' \
4124
'\x88\x1a\x27\x52' '\x70\x8b\xc9\x0b' \
4125
'\x98\x4e\x4d\x2f' '\xff\x7f\xe0\x4c' \
4126
'\x6f\xf7\x89\x2a' '\x25\x51\xc9\x66' \
4127
'\xd5\x7b\x5c\x55' '\xb3\x22\x0a\x55' \
4128
'\xad\x8b\x8f\x6a' '\xd7\x11\x3a\x18' \
4129
'\x3b\x30\x5a\x72' '\x39\x25\x4f\x1a' \
4130
'\xc7\x5a\xf1\x3a' '\xf0\x01\xc3\x08'
4129
self.req_bin_0 = b'\x58\x00\x14\x00' b'\x1e\xdf\xf2\x01' \
4130
b'\xa7\xb6\x09\x40' b'\x73\x7f\x0e\x78' \
4131
b'\x61\x35\x2f\x63' b'\xe9\x14\xc6\x48' \
4132
b'\x88\x1a\x27\x52' b'\x70\x8b\xc9\x0b' \
4133
b'\x98\x4e\x4d\x2f' b'\xff\x7f\xe0\x4c' \
4134
b'\x6f\xf7\x89\x2a' b'\x25\x51\xc9\x66' \
4135
b'\xd5\x7b\x5c\x55' b'\xb3\x22\x0a\x55' \
4136
b'\xad\x8b\x8f\x6a' b'\xd7\x11\x3a\x18' \
4137
b'\x3b\x30\x5a\x72' b'\x39\x25\x4f\x1a' \
4138
b'\xc7\x5a\xf1\x3a' b'\xf0\x01\xc3\x08'
4133
4141
def testPackRequest0(self):
4134
bin = apply(request.FreeColors._request.to_binary, (), self.req_args_0)
4142
bin = request.FreeColors._request.to_binary(*(), **self.req_args_0)
4136
4144
assert bin == self.req_bin_0
4137
4145
except AssertionError:
4155
4163
'items': [{'blue': 3577, 'flags': 221, 'green': 15650, 'pixel': 330879354, 'red': 30294}, {'blue': 18226, 'flags': 219, 'green': 45614, 'pixel': 302874221, 'red': 54265}, {'blue': 32215, 'flags': 160, 'green': 48737, 'pixel': 1699694808, 'red': 60115}, {'blue': 28524, 'flags': 209, 'green': 37615, 'pixel': 710550693, 'red': 50488}],
4156
4164
'cmap': 1791140577,
4158
self.req_bin_0 = '\x59\x00\x0e\x00' '\xe1\xa2\xc2\x6a' \
4159
'\x7a\xd1\xb8\x13' '\x56\x76\x22\x3d' \
4160
'\xf9\x0d\xdd\x00' '\x6d\x7e\x0d\x12' \
4161
'\xf9\xd3\x2e\xb2' '\x32\x47\xdb\x00' \
4162
'\xd8\x48\x4f\x65' '\xd3\xea\x61\xbe' \
4163
'\xd7\x7d\xa0\x00' '\xa5\x24\x5a\x2a' \
4164
'\x38\xc5\xef\x92' '\x6c\x6f\xd1\x00'
4166
self.req_bin_0 = b'\x59\x00\x0e\x00' b'\xe1\xa2\xc2\x6a' \
4167
b'\x7a\xd1\xb8\x13' b'\x56\x76\x22\x3d' \
4168
b'\xf9\x0d\xdd\x00' b'\x6d\x7e\x0d\x12' \
4169
b'\xf9\xd3\x2e\xb2' b'\x32\x47\xdb\x00' \
4170
b'\xd8\x48\x4f\x65' b'\xd3\xea\x61\xbe' \
4171
b'\xd7\x7d\xa0\x00' b'\xa5\x24\x5a\x2a' \
4172
b'\x38\xc5\xef\x92' b'\x6c\x6f\xd1\x00'
4167
4175
def testPackRequest0(self):
4168
bin = apply(request.StoreColors._request.to_binary, (), self.req_args_0)
4176
bin = request.StoreColors._request.to_binary(*(), **self.req_args_0)
4170
4178
assert bin == self.req_bin_0
4171
4179
except AssertionError:
4221
4229
'cmap': 1750052450,
4222
4230
'pixels': [1673396539, 1897675292, 1453845591, 816818886, 897340342, 1782049962, 796231465, 722380604],
4224
self.req_bin_0 = '\x5b\x00\x0a\x00' '\x62\xae\x4f\x68' \
4225
'\x3b\x01\xbe\x63' '\x1c\x3a\x1c\x71' \
4226
'\x57\xec\xa7\x56' '\xc6\xaa\xaf\x30' \
4227
'\xb6\x53\x7c\x35' '\xaa\xec\x37\x6a' \
4228
'\x29\x87\x75\x2f' '\x3c\xa7\x0e\x2b'
4232
self.req_bin_0 = b'\x5b\x00\x0a\x00' b'\x62\xae\x4f\x68' \
4233
b'\x3b\x01\xbe\x63' b'\x1c\x3a\x1c\x71' \
4234
b'\x57\xec\xa7\x56' b'\xc6\xaa\xaf\x30' \
4235
b'\xb6\x53\x7c\x35' b'\xaa\xec\x37\x6a' \
4236
b'\x29\x87\x75\x2f' b'\x3c\xa7\x0e\x2b'
4230
4238
self.reply_args_0 = {
4231
4239
'colors': [{'blue': 63820, 'green': 60107, 'red': 62261}, {'blue': 54480, 'green': 48839, 'red': 10033}, {'blue': 31765, 'green': 31737, 'red': 43117}, {'blue': 50953, 'green': 52009, 'red': 14234}, {'blue': 55150, 'green': 30330, 'red': 55956}],
4232
4240
'sequence_number': 10895,
4234
self.reply_bin_0 = '\x01\x00\x8f\x2a' '\x0a\x00\x00\x00' \
4235
'\x05\x00\x00\x00' '\x00\x00\x00\x00' \
4236
'\x00\x00\x00\x00' '\x00\x00\x00\x00' \
4237
'\x00\x00\x00\x00' '\x00\x00\x00\x00' \
4238
'\x35\xf3\xcb\xea' '\x4c\xf9\x00\x00' \
4239
'\x31\x27\xc7\xbe' '\xd0\xd4\x00\x00' \
4240
'\x6d\xa8\xf9\x7b' '\x15\x7c\x00\x00' \
4241
'\x9a\x37\x29\xcb' '\x09\xc7\x00\x00' \
4242
'\x94\xda\x7a\x76' '\x6e\xd7\x00\x00'
4242
self.reply_bin_0 = b'\x01\x00\x8f\x2a' b'\x0a\x00\x00\x00' \
4243
b'\x05\x00\x00\x00' b'\x00\x00\x00\x00' \
4244
b'\x00\x00\x00\x00' b'\x00\x00\x00\x00' \
4245
b'\x00\x00\x00\x00' b'\x00\x00\x00\x00' \
4246
b'\x35\xf3\xcb\xea' b'\x4c\xf9\x00\x00' \
4247
b'\x31\x27\xc7\xbe' b'\xd0\xd4\x00\x00' \
4248
b'\x6d\xa8\xf9\x7b' b'\x15\x7c\x00\x00' \
4249
b'\x9a\x37\x29\xcb' b'\x09\xc7\x00\x00' \
4250
b'\x94\xda\x7a\x76' b'\x6e\xd7\x00\x00'
4244
4252
self.req_args_1 = {
4245
4253
'cmap': 340337174,
4248
self.req_bin_1 = '\x5b\x00\x02\x00' '\x16\x22\x49\x14'
4256
self.req_bin_1 = b'\x5b\x00\x02\x00' b'\x16\x22\x49\x14'
4251
4259
def testPackRequest0(self):
4252
bin = apply(request.QueryColors._request.to_binary, (), self.req_args_0)
4260
bin = request.QueryColors._request.to_binary(*(), **self.req_args_0)
4254
4262
assert bin == self.req_bin_0
4255
4263
except AssertionError:
4628
4636
def setUp(self):
4629
4637
self.req_args_0 = {
4631
self.req_bin_0 = '\x63\x00\x01\x00'
4639
self.req_bin_0 = b'\x63\x00\x01\x00'
4633
4641
self.reply_args_0 = {
4634
4642
'names': ['XTRA', 'XTRA-II'],
4635
4643
'sequence_number': 21122,
4637
self.reply_bin_0 = '\x01\x02\x82\x52' '\x04\x00\x00\x00' \
4638
'\x00\x00\x00\x00' '\x00\x00\x00\x00' \
4639
'\x00\x00\x00\x00' '\x00\x00\x00\x00' \
4640
'\x00\x00\x00\x00' '\x00\x00\x00\x00' \
4641
'\x04\x58\x54\x52' '\x41\x07\x58\x54' \
4642
'\x52\x41\x2d\x49' '\x49\x00\x00\x00'
4645
self.reply_bin_0 = b'\x01\x02\x82\x52' b'\x04\x00\x00\x00' \
4646
b'\x00\x00\x00\x00' b'\x00\x00\x00\x00' \
4647
b'\x00\x00\x00\x00' b'\x00\x00\x00\x00' \
4648
b'\x00\x00\x00\x00' b'\x00\x00\x00\x00' \
4649
b'\x04\x58\x54\x52' b'\x41\x07\x58\x54' \
4650
b'\x52\x41\x2d\x49' b'\x49\x00\x00\x00'
4645
4653
def testPackRequest0(self):
4646
bin = apply(request.ListExtensions._request.to_binary, (), self.req_args_0)
4654
bin = request.ListExtensions._request.to_binary(*(), **self.req_args_0)
4648
4656
assert bin == self.req_bin_0
4649
4657
except AssertionError:
4685
4693
'first_keycode': 131,
4686
4694
'keysyms': [[1479273593, 495399194, 1752874714], [183124138, 826800766, 542058728], [519501686, 1358630902, 1051542205], [1363902850, 52079613, 1721268402], [2124568309, 323328202, 1426344655], [1775218167, 1821828429, 1704892958], [1784543283, 783698836, 1882907069], [1165130550, 1276086917, 957090966], [1623553701, 77158667, 420399405], [790514637, 1104383431, 1645303152], [879499287, 349457843, 1313813953], [367336866, 1207824094, 514125338], [767413913, 135340640, 756292967], [475442692, 2076098223, 1252936842], [964050497, 2006979633, 948353974], [1923834215, 1061136894, 1319606154], [1186538913, 1770176901, 715354628], [1470481551, 403222608, 252019996], [260033548, 1553379907, 1096456683], [2027881549, 1992616114, 382810564]],
4688
self.req_bin_0 = '\x64\x14\x3e\x00' '\x83\x03\x00\x00' \
4689
'\x79\xec\x2b\x58' '\x1a\x31\x87\x1d' \
4690
'\xda\xbe\x7a\x68' '\xaa\x40\xea\x0a' \
4691
'\x7e\xfa\x47\x31' '\xe8\x28\x4f\x20' \
4692
'\x76\xf7\xf6\x1e' '\xf6\x0f\xfb\x50' \
4693
'\xbd\x42\xad\x3e' '\x82\x81\x4b\x51' \
4694
'\xfd\xab\x1a\x03' '\xb2\x78\x98\x66' \
4695
'\xf5\x56\xa2\x7e' '\xca\x98\x45\x13' \
4696
'\xcf\x4a\x04\x55' '\xf7\xad\xcf\x69' \
4697
'\x4d\xe5\x96\x6c' '\x1e\x9a\x9e\x65' \
4698
'\x33\xf8\x5d\x6a' '\x94\x4b\xb6\x2e' \
4699
'\xbd\xe1\x3a\x70' '\x36\x7b\x72\x45' \
4700
'\x85\x8a\x0f\x4c' '\x96\x0c\x0c\x39' \
4701
'\xa5\x76\xc5\x60' '\x0b\x59\x99\x04' \
4702
'\x2d\xc9\x0e\x19' '\xcd\x4b\x1e\x2f' \
4703
'\xc7\x8d\xd3\x41' '\x70\x55\x11\x62' \
4704
'\x17\x18\x6c\x34' '\xb3\x4d\xd4\x14' \
4705
'\xc1\x35\x4f\x4e' '\xa2\x1d\xe5\x15' \
4706
'\xde\xee\xfd\x47' '\x1a\xee\xa4\x1e' \
4707
'\x99\xce\xbd\x2d' '\x60\x22\x11\x08' \
4708
'\x67\x1d\x14\x2d' '\x04\xae\x56\x1c' \
4709
'\xaf\xbe\xbe\x7b' '\x8a\x4c\xae\x4a' \
4710
'\x41\x3e\x76\x39' '\x31\x14\xa0\x77' \
4711
'\xb6\xbb\x86\x38' '\x67\x61\xab\x72' \
4712
'\xfe\xa9\x3f\x3f' '\x8a\x97\xa7\x4e' \
4713
'\xa1\x25\xb9\x46' '\x85\xc1\x82\x69' \
4714
'\x04\x72\xa3\x2a' '\x8f\xc4\xa5\x57' \
4715
'\x50\xb0\x08\x18' '\x1c\x85\x05\x0f' \
4716
'\x0c\xcc\x7f\x0f' '\x43\xb2\x96\x5c' \
4717
'\xeb\x99\x5a\x41' '\x4d\x04\xdf\x78' \
4718
'\xb2\xe8\xc4\x76' '\xc4\x39\xd1\x16'
4696
self.req_bin_0 = b'\x64\x14\x3e\x00' b'\x83\x03\x00\x00' \
4697
b'\x79\xec\x2b\x58' b'\x1a\x31\x87\x1d' \
4698
b'\xda\xbe\x7a\x68' b'\xaa\x40\xea\x0a' \
4699
b'\x7e\xfa\x47\x31' b'\xe8\x28\x4f\x20' \
4700
b'\x76\xf7\xf6\x1e' b'\xf6\x0f\xfb\x50' \
4701
b'\xbd\x42\xad\x3e' b'\x82\x81\x4b\x51' \
4702
b'\xfd\xab\x1a\x03' b'\xb2\x78\x98\x66' \
4703
b'\xf5\x56\xa2\x7e' b'\xca\x98\x45\x13' \
4704
b'\xcf\x4a\x04\x55' b'\xf7\xad\xcf\x69' \
4705
b'\x4d\xe5\x96\x6c' b'\x1e\x9a\x9e\x65' \
4706
b'\x33\xf8\x5d\x6a' b'\x94\x4b\xb6\x2e' \
4707
b'\xbd\xe1\x3a\x70' b'\x36\x7b\x72\x45' \
4708
b'\x85\x8a\x0f\x4c' b'\x96\x0c\x0c\x39' \
4709
b'\xa5\x76\xc5\x60' b'\x0b\x59\x99\x04' \
4710
b'\x2d\xc9\x0e\x19' b'\xcd\x4b\x1e\x2f' \
4711
b'\xc7\x8d\xd3\x41' b'\x70\x55\x11\x62' \
4712
b'\x17\x18\x6c\x34' b'\xb3\x4d\xd4\x14' \
4713
b'\xc1\x35\x4f\x4e' b'\xa2\x1d\xe5\x15' \
4714
b'\xde\xee\xfd\x47' b'\x1a\xee\xa4\x1e' \
4715
b'\x99\xce\xbd\x2d' b'\x60\x22\x11\x08' \
4716
b'\x67\x1d\x14\x2d' b'\x04\xae\x56\x1c' \
4717
b'\xaf\xbe\xbe\x7b' b'\x8a\x4c\xae\x4a' \
4718
b'\x41\x3e\x76\x39' b'\x31\x14\xa0\x77' \
4719
b'\xb6\xbb\x86\x38' b'\x67\x61\xab\x72' \
4720
b'\xfe\xa9\x3f\x3f' b'\x8a\x97\xa7\x4e' \
4721
b'\xa1\x25\xb9\x46' b'\x85\xc1\x82\x69' \
4722
b'\x04\x72\xa3\x2a' b'\x8f\xc4\xa5\x57' \
4723
b'\x50\xb0\x08\x18' b'\x1c\x85\x05\x0f' \
4724
b'\x0c\xcc\x7f\x0f' b'\x43\xb2\x96\x5c' \
4725
b'\xeb\x99\x5a\x41' b'\x4d\x04\xdf\x78' \
4726
b'\xb2\xe8\xc4\x76' b'\xc4\x39\xd1\x16'
4721
4729
def testPackRequest0(self):
4722
bin = apply(request.ChangeKeyboardMapping._request.to_binary, (), self.req_args_0)
4730
bin = request.ChangeKeyboardMapping._request.to_binary(*(), **self.req_args_0)
4724
4732
assert bin == self.req_bin_0
4725
4733
except AssertionError:
4743
4751
'first_keycode': 174,
4746
self.req_bin_0 = '\x65\x00\x02\x00' '\xae\xe9\x00\x00'
4754
self.req_bin_0 = b'\x65\x00\x02\x00' b'\xae\xe9\x00\x00'
4748
4756
self.reply_args_0 = {
4749
4757
'keysyms': [[536700486, 90972970, 1834434734], [604690854, 1612992766, 1785113276], [1258017014, 814047417, 79874791], [1752913778, 2069894554, 1342993084], [691283205, 2002270597, 1552550365], [1427239047, 80222814, 380890249], [932130695, 1233544402, 1343201446], [850296480, 830996690, 1219102856], [1427529259, 1334110395, 1423305447], [925543758, 1154246092, 389857513], [782217983, 1673349321, 296773941], [904384636, 788791004, 1427343811], [578056967, 1628142600, 882651915], [1727003528, 1202959768, 59536638], [932784259, 453243643, 1846802632], [1527858524, 2055184942, 1534128611], [134086768, 909769847, 323736641], [2080620639, 1573387975, 566724688], [1393924270, 1408645244, 1610610798], [391612329, 341605408, 484634403]],
4750
4758
'sequence_number': 27901,
4752
self.reply_bin_0 = '\x01\x03\xfd\x6c' '\x3c\x00\x00\x00' \
4753
'\x00\x00\x00\x00' '\x00\x00\x00\x00' \
4754
'\x00\x00\x00\x00' '\x00\x00\x00\x00' \
4755
'\x00\x00\x00\x00' '\x00\x00\x00\x00' \
4756
'\x46\x66\xfd\x1f' '\x2a\x23\x6c\x05' \
4757
'\xae\x40\x57\x6d' '\xa6\xd9\x0a\x24' \
4758
'\xfe\x50\x24\x60' '\xbc\xaa\x66\x6a' \
4759
'\xf6\xd0\xfb\x4a' '\xb9\x60\x85\x30' \
4760
'\xe7\xca\xc2\x04' '\x72\x57\x7b\x68' \
4761
'\x9a\x15\x60\x7b' '\xbc\x72\x0c\x50' \
4762
'\x05\x25\x34\x29' '\x85\x39\x58\x77' \
4763
'\xdd\x09\x8a\x5c' '\x87\xf0\x11\x55' \
4764
'\x5e\x1a\xc8\x04' '\x89\xec\xb3\x16' \
4765
'\x87\x2f\x8f\x37' '\xd2\x64\x86\x49' \
4766
'\xa6\xa0\x0f\x50' '\xa0\x7e\xae\x32' \
4767
'\xd2\x00\x88\x31' '\x88\x08\xaa\x48' \
4768
'\x2b\x5e\x16\x55' '\xbb\xe8\x84\x4f' \
4769
'\xe7\xea\xd5\x54' '\x4e\xad\x2a\x37' \
4770
'\xcc\x65\xcc\x44' '\xe9\xc0\x3c\x17' \
4771
'\xff\xb2\x9f\x2e' '\xc9\x48\xbd\x63' \
4772
'\x35\x69\xb0\x11' '\x7c\xd0\xe7\x35' \
4773
'\xdc\xfe\x03\x2f' '\xc3\x89\x13\x55' \
4774
'\x07\x73\x74\x22' '\x08\x7c\x0b\x61' \
4775
'\x0b\x33\x9c\x34' '\x88\xfb\xef\x66' \
4776
'\x98\xb5\xb3\x47' '\xfe\x74\x8c\x03' \
4777
'\x83\x28\x99\x37' '\xfb\xf2\x03\x1b' \
4778
'\xc8\xf8\x13\x6e' '\x5c\x45\x11\x5b' \
4779
'\x2e\xa2\x7f\x7a' '\xe3\xf1\x70\x5b' \
4780
'\x70\x00\xfe\x07' '\x77\xfc\x39\x36' \
4781
'\x41\xd4\x4b\x13' '\x5f\xc0\x03\x7c' \
4782
'\xc7\xfe\xc7\x5d' '\x50\x88\xc7\x21' \
4783
'\xae\x98\x15\x53' '\x7c\x38\xf6\x53' \
4784
'\x6e\xf8\xff\x5f' '\xa9\x87\x57\x17' \
4785
'\x20\x7c\x5c\x14' '\x23\xef\xe2\x1c'
4760
self.reply_bin_0 = b'\x01\x03\xfd\x6c' b'\x3c\x00\x00\x00' \
4761
b'\x00\x00\x00\x00' b'\x00\x00\x00\x00' \
4762
b'\x00\x00\x00\x00' b'\x00\x00\x00\x00' \
4763
b'\x00\x00\x00\x00' b'\x00\x00\x00\x00' \
4764
b'\x46\x66\xfd\x1f' b'\x2a\x23\x6c\x05' \
4765
b'\xae\x40\x57\x6d' b'\xa6\xd9\x0a\x24' \
4766
b'\xfe\x50\x24\x60' b'\xbc\xaa\x66\x6a' \
4767
b'\xf6\xd0\xfb\x4a' b'\xb9\x60\x85\x30' \
4768
b'\xe7\xca\xc2\x04' b'\x72\x57\x7b\x68' \
4769
b'\x9a\x15\x60\x7b' b'\xbc\x72\x0c\x50' \
4770
b'\x05\x25\x34\x29' b'\x85\x39\x58\x77' \
4771
b'\xdd\x09\x8a\x5c' b'\x87\xf0\x11\x55' \
4772
b'\x5e\x1a\xc8\x04' b'\x89\xec\xb3\x16' \
4773
b'\x87\x2f\x8f\x37' b'\xd2\x64\x86\x49' \
4774
b'\xa6\xa0\x0f\x50' b'\xa0\x7e\xae\x32' \
4775
b'\xd2\x00\x88\x31' b'\x88\x08\xaa\x48' \
4776
b'\x2b\x5e\x16\x55' b'\xbb\xe8\x84\x4f' \
4777
b'\xe7\xea\xd5\x54' b'\x4e\xad\x2a\x37' \
4778
b'\xcc\x65\xcc\x44' b'\xe9\xc0\x3c\x17' \
4779
b'\xff\xb2\x9f\x2e' b'\xc9\x48\xbd\x63' \
4780
b'\x35\x69\xb0\x11' b'\x7c\xd0\xe7\x35' \
4781
b'\xdc\xfe\x03\x2f' b'\xc3\x89\x13\x55' \
4782
b'\x07\x73\x74\x22' b'\x08\x7c\x0b\x61' \
4783
b'\x0b\x33\x9c\x34' b'\x88\xfb\xef\x66' \
4784
b'\x98\xb5\xb3\x47' b'\xfe\x74\x8c\x03' \
4785
b'\x83\x28\x99\x37' b'\xfb\xf2\x03\x1b' \
4786
b'\xc8\xf8\x13\x6e' b'\x5c\x45\x11\x5b' \
4787
b'\x2e\xa2\x7f\x7a' b'\xe3\xf1\x70\x5b' \
4788
b'\x70\x00\xfe\x07' b'\x77\xfc\x39\x36' \
4789
b'\x41\xd4\x4b\x13' b'\x5f\xc0\x03\x7c' \
4790
b'\xc7\xfe\xc7\x5d' b'\x50\x88\xc7\x21' \
4791
b'\xae\x98\x15\x53' b'\x7c\x38\xf6\x53' \
4792
b'\x6e\xf8\xff\x5f' b'\xa9\x87\x57\x17' \
4793
b'\x20\x7c\x5c\x14' b'\x23\xef\xe2\x1c'
4788
4796
def testPackRequest0(self):
4789
bin = apply(request.GetKeyboardMapping._request.to_binary, (), self.req_args_0)
4797
bin = request.GetKeyboardMapping._request.to_binary(*(), **self.req_args_0)
4791
4799
assert bin == self.req_bin_0
4792
4800
except AssertionError:
4827
4835
self.req_args_0 = {
4828
4836
'attrs': {'led': 241, 'key': 193, 'bell_duration': -19485, 'auto_repeat_mode': 0, 'bell_pitch': -13220, 'key_click_percent': -3, 'bell_percent': -74, 'led_mode': 1},
4830
self.req_bin_0 = '\x66\x00\x0a\x00' '\xff\x00\x00\x00' \
4831
'\xfd\x00\x00\x00' '\xb6\x00\x00\x00' \
4832
'\x5c\xcc\x00\x00' '\xe3\xb3\x00\x00' \
4833
'\xf1\x00\x00\x00' '\x01\x00\x00\x00' \
4834
'\xc1\x00\x00\x00' '\x00\x00\x00\x00'
4838
self.req_bin_0 = b'\x66\x00\x0a\x00' b'\xff\x00\x00\x00' \
4839
b'\xfd\x00\x00\x00' b'\xb6\x00\x00\x00' \
4840
b'\x5c\xcc\x00\x00' b'\xe3\xb3\x00\x00' \
4841
b'\xf1\x00\x00\x00' b'\x01\x00\x00\x00' \
4842
b'\xc1\x00\x00\x00' b'\x00\x00\x00\x00'
4837
4845
def testPackRequest0(self):
4838
bin = apply(request.ChangeKeyboardControl._request.to_binary, (), self.req_args_0)
4846
bin = request.ChangeKeyboardControl._request.to_binary(*(), **self.req_args_0)
4840
4848
assert bin == self.req_bin_0
4841
4849
except AssertionError:
4869
4877
'sequence_number': 62321,
4870
4878
'key_click_percent': 140,
4872
self.reply_bin_0 = '\x01\x01\x71\xf3' '\x05\x00\x00\x00' \
4873
'\x0b\xed\xd0\x52' '\x8c\x82\xb8\x6b' \
4874
'\xca\x66\x00\x00' '\x81\xd3\xb4\xca' \
4875
'\xda\x91\x81\x88' '\x89\xa5\xd2\xa0' \
4876
'\xe5\xdf\xe2\x82' '\xc5\xe9\xbb\xa6' \
4877
'\xd3\xf1\xad\xb7' '\xb8\xd8\xd8\xda' \
4880
self.reply_bin_0 = b'\x01\x01\x71\xf3' b'\x05\x00\x00\x00' \
4881
b'\x0b\xed\xd0\x52' b'\x8c\x82\xb8\x6b' \
4882
b'\xca\x66\x00\x00' b'\x81\xd3\xb4\xca' \
4883
b'\xda\x91\x81\x88' b'\x89\xa5\xd2\xa0' \
4884
b'\xe5\xdf\xe2\x82' b'\xc5\xe9\xbb\xa6' \
4885
b'\xd3\xf1\xad\xb7' b'\xb8\xd8\xd8\xda' \
4881
4889
def testPackRequest0(self):
4882
bin = apply(request.GetKeyboardControl._request.to_binary, (), self.req_args_0)
4890
bin = request.GetKeyboardControl._request.to_binary(*(), **self.req_args_0)
4884
4892
assert bin == self.req_bin_0
4885
4893
except AssertionError:
5150
5158
def setUp(self):
5151
5159
self.req_args_0 = {
5153
self.req_bin_0 = '\x6e\x00\x01\x00'
5161
self.req_bin_0 = b'\x6e\x00\x01\x00'
5155
5163
self.reply_args_0 = {
5156
5164
'hosts': [{'name': [34, 23, 178, 12], 'family': 0}, {'name': [130, 236, 254, 15], 'family': 0}],
5158
5166
'sequence_number': 33455,
5160
self.reply_bin_0 = '\x01\x01\xaf\x82' '\x04\x00\x00\x00' \
5161
'\x02\x00\x00\x00' '\x00\x00\x00\x00' \
5162
'\x00\x00\x00\x00' '\x00\x00\x00\x00' \
5163
'\x00\x00\x00\x00' '\x00\x00\x00\x00' \
5164
'\x00\x00\x04\x00' '\x22\x17\xb2\x0c' \
5165
'\x00\x00\x04\x00' '\x82\xec\xfe\x0f'
5168
self.reply_bin_0 = b'\x01\x01\xaf\x82' b'\x04\x00\x00\x00' \
5169
b'\x02\x00\x00\x00' b'\x00\x00\x00\x00' \
5170
b'\x00\x00\x00\x00' b'\x00\x00\x00\x00' \
5171
b'\x00\x00\x00\x00' b'\x00\x00\x00\x00' \
5172
b'\x00\x00\x04\x00' b'\x22\x17\xb2\x0c' \
5173
b'\x00\x00\x04\x00' b'\x82\xec\xfe\x0f'
5168
5176
def testPackRequest0(self):
5169
bin = apply(request.ListHosts._request.to_binary, (), self.req_args_0)
5177
bin = request.ListHosts._request.to_binary(*(), **self.req_args_0)
5171
5179
assert bin == self.req_bin_0
5172
5180
except AssertionError:
5290
5298
'properties': [194806244, 1444715269, 486779871, 1850032482, 1083061497, 786546027, 807635511, 1716883082, 80335197, 1654299, 1459844212, 850673646],
5291
5299
'delta': -27029,
5293
self.req_bin_0 = '\x72\x00\x0f\x00' '\xfd\x1b\x7e\x44' \
5294
'\x0c\x00\x6b\x96' '\xe4\x81\x9c\x0b' \
5295
'\x05\x9b\x1c\x56' '\xdf\xab\x03\x1d' \
5296
'\x62\x41\x45\x6e' '\xf9\x34\x8e\x40' \
5297
'\x6b\xbd\xe1\x2e' '\x37\x8a\x23\x30' \
5298
'\x8a\x8e\x55\x66' '\x5d\xd1\xc9\x04' \
5299
'\x1b\x3e\x19\x00' '\x74\x74\x03\x57' \
5301
self.req_bin_0 = b'\x72\x00\x0f\x00' b'\xfd\x1b\x7e\x44' \
5302
b'\x0c\x00\x6b\x96' b'\xe4\x81\x9c\x0b' \
5303
b'\x05\x9b\x1c\x56' b'\xdf\xab\x03\x1d' \
5304
b'\x62\x41\x45\x6e' b'\xf9\x34\x8e\x40' \
5305
b'\x6b\xbd\xe1\x2e' b'\x37\x8a\x23\x30' \
5306
b'\x8a\x8e\x55\x66' b'\x5d\xd1\xc9\x04' \
5307
b'\x1b\x3e\x19\x00' b'\x74\x74\x03\x57' \
5303
5311
def testPackRequest0(self):
5304
bin = apply(request.RotateProperties._request.to_binary, (), self.req_args_0)
5312
bin = request.RotateProperties._request.to_binary(*(), **self.req_args_0)
5306
5314
assert bin == self.req_bin_0
5307
5315
except AssertionError:
5351
5359
self.req_args_0 = {
5352
5360
'map': [130, 178, 229, 218, 178],
5354
self.req_bin_0 = '\x74\x05\x03\x00' '\x82\xb2\xe5\xda' \
5362
self.req_bin_0 = b'\x74\x05\x03\x00' b'\x82\xb2\xe5\xda' \
5357
5365
self.reply_args_0 = {
5359
5367
'sequence_number': 57045,
5361
self.reply_bin_0 = '\x01\x91\xd5\xde' '\x00\x00\x00\x00' \
5362
'\x00\x00\x00\x00' '\x00\x00\x00\x00' \
5363
'\x00\x00\x00\x00' '\x00\x00\x00\x00' \
5364
'\x00\x00\x00\x00' '\x00\x00\x00\x00'
5369
self.reply_bin_0 = b'\x01\x91\xd5\xde' b'\x00\x00\x00\x00' \
5370
b'\x00\x00\x00\x00' b'\x00\x00\x00\x00' \
5371
b'\x00\x00\x00\x00' b'\x00\x00\x00\x00' \
5372
b'\x00\x00\x00\x00' b'\x00\x00\x00\x00'
5367
5375
def testPackRequest0(self):
5368
bin = apply(request.SetPointerMapping._request.to_binary, (), self.req_args_0)
5376
bin = request.SetPointerMapping._request.to_binary(*(), **self.req_args_0)
5370
5378
assert bin == self.req_bin_0
5371
5379
except AssertionError:
5405
5413
def setUp(self):
5406
5414
self.req_args_0 = {
5408
self.req_bin_0 = '\x75\x00\x01\x00'
5416
self.req_bin_0 = b'\x75\x00\x01\x00'
5410
5418
self.reply_args_0 = {
5411
5419
'map': [248, 185, 227, 157, 133],
5412
5420
'sequence_number': 20072,
5414
self.reply_bin_0 = '\x01\x05\x68\x4e' '\x02\x00\x00\x00' \
5415
'\x00\x00\x00\x00' '\x00\x00\x00\x00' \
5416
'\x00\x00\x00\x00' '\x00\x00\x00\x00' \
5417
'\x00\x00\x00\x00' '\x00\x00\x00\x00' \
5418
'\xf8\xb9\xe3\x9d' '\x85\x00\x00\x00'
5422
self.reply_bin_0 = b'\x01\x05\x68\x4e' b'\x02\x00\x00\x00' \
5423
b'\x00\x00\x00\x00' b'\x00\x00\x00\x00' \
5424
b'\x00\x00\x00\x00' b'\x00\x00\x00\x00' \
5425
b'\x00\x00\x00\x00' b'\x00\x00\x00\x00' \
5426
b'\xf8\xb9\xe3\x9d' b'\x85\x00\x00\x00'
5421
5429
def testPackRequest0(self):
5422
bin = apply(request.GetPointerMapping._request.to_binary, (), self.req_args_0)
5430
bin = request.GetPointerMapping._request.to_binary(*(), **self.req_args_0)
5424
5432
assert bin == self.req_bin_0
5425
5433
except AssertionError:
5460
5468
self.req_args_0 = {
5461
5469
'keycodes': [[6, 191], [94, 123], [46, 94], [104, 116], [132, 158], [35, 75], [128, 63], [135, 221]],
5463
self.req_bin_0 = '\x76\x02\x05\x00' '\x06\xbf\x5e\x7b' \
5464
'\x2e\x5e\x68\x74' '\x84\x9e\x23\x4b' \
5471
self.req_bin_0 = b'\x76\x02\x05\x00' b'\x06\xbf\x5e\x7b' \
5472
b'\x2e\x5e\x68\x74' b'\x84\x9e\x23\x4b' \
5467
5475
self.reply_args_0 = {
5469
5477
'sequence_number': 26757,
5471
self.reply_bin_0 = '\x01\x95\x85\x68' '\x00\x00\x00\x00' \
5472
'\x00\x00\x00\x00' '\x00\x00\x00\x00' \
5473
'\x00\x00\x00\x00' '\x00\x00\x00\x00' \
5474
'\x00\x00\x00\x00' '\x00\x00\x00\x00'
5479
self.reply_bin_0 = b'\x01\x95\x85\x68' b'\x00\x00\x00\x00' \
5480
b'\x00\x00\x00\x00' b'\x00\x00\x00\x00' \
5481
b'\x00\x00\x00\x00' b'\x00\x00\x00\x00' \
5482
b'\x00\x00\x00\x00' b'\x00\x00\x00\x00'
5477
5485
def testPackRequest0(self):
5478
bin = apply(request.SetModifierMapping._request.to_binary, (), self.req_args_0)
5486
bin = request.SetModifierMapping._request.to_binary(*(), **self.req_args_0)
5480
5488
assert bin == self.req_bin_0
5481
5489
except AssertionError:
5515
5523
def setUp(self):
5516
5524
self.req_args_0 = {
5518
self.req_bin_0 = '\x77\x00\x01\x00'
5526
self.req_bin_0 = b'\x77\x00\x01\x00'
5520
5528
self.reply_args_0 = {
5521
5529
'keycodes': [[85, 162], [139, 194], [12, 107], [120, 193], [26, 40], [125, 221], [27, 0], [220, 78]],
5522
5530
'sequence_number': 17677,
5524
self.reply_bin_0 = '\x01\x02\x0d\x45' '\x04\x00\x00\x00' \
5525
'\x00\x00\x00\x00' '\x00\x00\x00\x00' \
5526
'\x00\x00\x00\x00' '\x00\x00\x00\x00' \
5527
'\x00\x00\x00\x00' '\x00\x00\x00\x00' \
5528
'\x55\xa2\x8b\xc2' '\x0c\x6b\x78\xc1' \
5529
'\x1a\x28\x7d\xdd' '\x1b\x00\xdc\x4e'
5532
self.reply_bin_0 = b'\x01\x02\x0d\x45' b'\x04\x00\x00\x00' \
5533
b'\x00\x00\x00\x00' b'\x00\x00\x00\x00' \
5534
b'\x00\x00\x00\x00' b'\x00\x00\x00\x00' \
5535
b'\x00\x00\x00\x00' b'\x00\x00\x00\x00' \
5536
b'\x55\xa2\x8b\xc2' b'\x0c\x6b\x78\xc1' \
5537
b'\x1a\x28\x7d\xdd' b'\x1b\x00\xdc\x4e'
5532
5540
def testPackRequest0(self):
5533
bin = apply(request.GetModifierMapping._request.to_binary, (), self.req_args_0)
5541
bin = request.GetModifierMapping._request.to_binary(*(), **self.req_args_0)
5535
5543
assert bin == self.req_bin_0
5536
5544
except AssertionError: