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):
78
self.req_bin_0 = '\x01\xba\x00\x17' '\x6d\x03\x01\x24' \
79
'\x74\xdb\x41\x4e' '\xae\xdd\xf0\x2f' \
80
'\xc9\x0a\x96\xd0' '\x86\x93\x00\x00' \
81
'\x17\xba\x10\x13' '\x00\x00\x7f\xff' \
82
'\x5e\x67\x63\x43' '\x0c\x77\x07\x07' \
83
'\x76\xc4\x0c\xaa' '\x7f\x48\x9d\x8c' \
84
'\x00\x00\x00\x00' '\x03\x00\x00\x00' \
85
'\x02\x00\x00\x00' '\x56\xac\x9b\x9d' \
86
'\x21\x76\x49\x57' '\x00\x00\x00\x00' \
87
'\x00\x00\x00\x00' '\x15\xf2\xee\x1c' \
88
'\x23\x97\xad\x71' '\x16\x7e\xec\x01' \
86
self.req_bin_0 = b'\x01\xba\x00\x17' b'\x6d\x03\x01\x24' \
87
b'\x74\xdb\x41\x4e' b'\xae\xdd\xf0\x2f' \
88
b'\xc9\x0a\x96\xd0' b'\x86\x93\x00\x00' \
89
b'\x17\xba\x10\x13' b'\x00\x00\x7f\xff' \
90
b'\x5e\x67\x63\x43' b'\x0c\x77\x07\x07' \
91
b'\x76\xc4\x0c\xaa' b'\x7f\x48\x9d\x8c' \
92
b'\x00\x00\x00\x00' b'\x03\x00\x00\x00' \
93
b'\x02\x00\x00\x00' b'\x56\xac\x9b\x9d' \
94
b'\x21\x76\x49\x57' b'\x00\x00\x00\x00' \
95
b'\x00\x00\x00\x00' b'\x15\xf2\xee\x1c' \
96
b'\x23\x97\xad\x71' b'\x16\x7e\xec\x01' \
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': 1813552124,
115
123
'attrs': {'backing_pixel': 59516078, 'cursor': 1682969315, 'background_pixmap': 370313360, 'border_pixmap': 1158771722, 'backing_planes': 1432315664, 'win_gravity': 3, 'backing_store': 1, 'event_mask': 1054128649, 'save_under': 0, 'background_pixel': 1953340842, 'colormap': 1462101672, 'border_pixel': 287436510, 'bit_gravity': 10, 'do_not_propagate_mask': 1283834625, 'override_redirect': 0},
117
self.req_bin_0 = '\x02\x00\x00\x12' '\x6c\x18\x9b\xfc' \
118
'\x00\x00\x7f\xff' '\x16\x12\x88\x90' \
119
'\x74\x6d\x9d\xaa' '\x45\x11\x74\x0a' \
120
'\x11\x21\xee\xde' '\x0a\x00\x00\x00' \
121
'\x03\x00\x00\x00' '\x01\x00\x00\x00' \
122
'\x55\x5f\x67\x10' '\x03\x8c\x24\xae' \
123
'\x00\x00\x00\x00' '\x00\x00\x00\x00' \
124
'\x3e\xd4\xba\x09' '\x4c\x85\xc3\x01' \
125
'\x57\x25\xe6\xa8' '\x64\x50\x12\xe3'
125
self.req_bin_0 = b'\x02\x00\x00\x12' b'\x6c\x18\x9b\xfc' \
126
b'\x00\x00\x7f\xff' b'\x16\x12\x88\x90' \
127
b'\x74\x6d\x9d\xaa' b'\x45\x11\x74\x0a' \
128
b'\x11\x21\xee\xde' b'\x0a\x00\x00\x00' \
129
b'\x03\x00\x00\x00' b'\x01\x00\x00\x00' \
130
b'\x55\x5f\x67\x10' b'\x03\x8c\x24\xae' \
131
b'\x00\x00\x00\x00' b'\x00\x00\x00\x00' \
132
b'\x3e\xd4\xba\x09' b'\x4c\x85\xc3\x01' \
133
b'\x57\x25\xe6\xa8' b'\x64\x50\x12\xe3'
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': 190634459,
442
450
'attrs': {'height': 57788, 'stack_mode': 2, 'border_width': -320, 'width': 53674, 'x': -2248, 'y': -29960, 'sibling': 1012823324},
444
self.req_bin_0 = '\x0c\x00\x00\x0a' '\x0b\x5c\xd9\xdb' \
445
'\x00\x7f\x00\x00' '\xf7\x38\x00\x00' \
446
'\x8a\xf8\x00\x00' '\xd1\xaa\x00\x00' \
447
'\xe1\xbc\x00\x00' '\xfe\xc0\x00\x00' \
448
'\x3c\x5e\x75\x1c' '\x02\x00\x00\x00'
452
self.req_bin_0 = b'\x0c\x00\x00\x0a' b'\x0b\x5c\xd9\xdb' \
453
b'\x00\x7f\x00\x00' b'\xf7\x38\x00\x00' \
454
b'\x8a\xf8\x00\x00' b'\xd1\xaa\x00\x00' \
455
b'\xe1\xbc\x00\x00' b'\xfe\xc0\x00\x00' \
456
b'\x3c\x5e\x75\x1c' b'\x02\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
'root': 1856577120,
569
577
'parent': 2105827407,
571
self.reply_bin_0 = '\x01\x00\x84\x5f' '\x00\x00\x00\x07' \
572
'\x6e\xa9\x1e\x60' '\x7d\x84\x60\x4f' \
573
'\x00\x07\x00\x00' '\x00\x00\x00\x00' \
574
'\x00\x00\x00\x00' '\x00\x00\x00\x00' \
575
'\x6b\x09\x3d\x72' '\x59\x14\x21\xa5' \
576
'\x2c\x9a\x2c\x42' '\x2b\x7b\x78\xa1' \
577
'\x4b\x39\x79\x79' '\x03\xd4\x32\x73' \
579
self.reply_bin_0 = b'\x01\x00\x84\x5f' b'\x00\x00\x00\x07' \
580
b'\x6e\xa9\x1e\x60' b'\x7d\x84\x60\x4f' \
581
b'\x00\x07\x00\x00' b'\x00\x00\x00\x00' \
582
b'\x00\x00\x00\x00' b'\x00\x00\x00\x00' \
583
b'\x6b\x09\x3d\x72' b'\x59\x14\x21\xa5' \
584
b'\x2c\x9a\x2c\x42' b'\x2b\x7b\x78\xa1' \
585
b'\x4b\x39\x79\x79' b'\x03\xd4\x32\x73' \
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
'only_if_exists': 0,
622
630
'name': 'fuzzy_prop',
624
self.req_bin_0 = '\x10\x00\x00\x05' '\x00\x0a\x00\x00' \
625
'\x66\x75\x7a\x7a' '\x79\x5f\x70\x72' \
632
self.req_bin_0 = b'\x10\x00\x00\x05' b'\x00\x0a\x00\x00' \
633
b'\x66\x75\x7a\x7a' b'\x79\x5f\x70\x72' \
628
636
self.reply_args_0 = {
629
637
'atom': 48723297,
630
638
'sequence_number': 35223,
632
self.reply_bin_0 = '\x01\x00\x89\x97' '\x00\x00\x00\x00' \
633
'\x02\xe7\x75\x61' '\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\x89\x97' b'\x00\x00\x00\x00' \
641
b'\x02\xe7\x75\x61' 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': 1022286544,
680
self.req_bin_0 = '\x11\x00\x00\x02' '\x3c\xee\xda\xd0'
688
self.req_bin_0 = b'\x11\x00\x00\x02' b'\x3c\xee\xda\xd0'
682
690
self.reply_args_0 = {
683
691
'sequence_number': 22699,
684
692
'name': 'WM_CLASS',
686
self.reply_bin_0 = '\x01\x00\x58\xab' '\x00\x00\x00\x02' \
687
'\x00\x08\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\x58\xab' b'\x00\x00\x00\x02' \
695
b'\x00\x08\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
'property_type': 704363625,
1100
1108
'bytes_after': 1957409055,
1102
self.reply_bin_7 = '\x01\x20\x90\xe6' '\x00\x00\x00\x03' \
1103
'\x29\xfb\xbc\x69' '\x74\xab\xb1\x1f' \
1104
'\x00\x00\x00\x03' '\x00\x00\x00\x00' \
1105
'\x00\x00\x00\x00' '\x00\x00\x00\x00' \
1106
'\x00\x00\x00\x01' '\x00\x00\x00\x02' \
1110
self.reply_bin_7 = b'\x01\x20\x90\xe6' b'\x00\x00\x00\x03' \
1111
b'\x29\xfb\xbc\x69' b'\x74\xab\xb1\x1f' \
1112
b'\x00\x00\x00\x03' b'\x00\x00\x00\x00' \
1113
b'\x00\x00\x00\x00' b'\x00\x00\x00\x00' \
1114
b'\x00\x00\x00\x01' b'\x00\x00\x00\x02' \
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': 91262675,
1278
self.req_bin_0 = '\x15\x00\x00\x02' '\x05\x70\x8e\xd3'
1286
self.req_bin_0 = b'\x15\x00\x00\x02' b'\x05\x70\x8e\xd3'
1280
1288
self.reply_args_0 = {
1281
1289
'atoms': [580972634, 926488735, 714741529, 408777797, 679906858, 705092899, 2063243279, 893967755, 1591182471, 571137996, 1677110101, 1783836762, 1678219148, 1992402577, 871298793, 1182885899, 1155013854, 1822076326, 2117552706, 1972668469, 1660227078, 1523268962, 694042433],
1282
1290
'sequence_number': 42191,
1284
self.reply_bin_0 = '\x01\x00\xa4\xcf' '\x00\x00\x00\x17' \
1285
'\x00\x17\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
'\x22\xa0\xf0\x5a' '\x37\x39\x18\x9f' \
1289
'\x2a\x9a\x17\x19' '\x18\x5d\x74\x45' \
1290
'\x28\x86\x8e\x2a' '\x2a\x06\xdd\x23' \
1291
'\x7a\xfa\x98\x0f' '\x35\x48\xdd\x8b' \
1292
'\x5e\xd7\x84\x87' '\x22\x0a\xdf\xcc' \
1293
'\x63\xf6\xab\x55' '\x6a\x53\x30\x5a' \
1294
'\x64\x07\x97\x8c' '\x76\xc1\xa6\x91' \
1295
'\x33\xee\xf6\xe9' '\x46\x81\x68\x0b' \
1296
'\x44\xd8\x1c\xde' '\x6c\x9a\xad\xa6' \
1297
'\x7e\x37\x4a\x42' '\x75\x94\x88\x35' \
1298
'\x62\xf5\x0e\x06' '\x5a\xcb\x3d\x62' \
1292
self.reply_bin_0 = b'\x01\x00\xa4\xcf' b'\x00\x00\x00\x17' \
1293
b'\x00\x17\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'\x22\xa0\xf0\x5a' b'\x37\x39\x18\x9f' \
1297
b'\x2a\x9a\x17\x19' b'\x18\x5d\x74\x45' \
1298
b'\x28\x86\x8e\x2a' b'\x2a\x06\xdd\x23' \
1299
b'\x7a\xfa\x98\x0f' b'\x35\x48\xdd\x8b' \
1300
b'\x5e\xd7\x84\x87' b'\x22\x0a\xdf\xcc' \
1301
b'\x63\xf6\xab\x55' b'\x6a\x53\x30\x5a' \
1302
b'\x64\x07\x97\x8c' b'\x76\xc1\xa6\x91' \
1303
b'\x33\xee\xf6\xe9' b'\x46\x81\x68\x0b' \
1304
b'\x44\xd8\x1c\xde' b'\x6c\x9a\xad\xa6' \
1305
b'\x7e\x37\x4a\x42' b'\x75\x94\x88\x35' \
1306
b'\x62\xf5\x0e\x06' b'\x5a\xcb\x3d\x62' \
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
'destination': 1369243800,
1462
1470
'event_mask': 1594482936,
1464
self.req_bin_0 = '\x19\x01\x00\x0b' '\x51\x9d\x00\x98' \
1465
'\x5f\x09\xe0\xf8' '\x0c\x00\x00\x00' \
1466
'\x4e\xce\xfa\x94' '\xcd\x42\xdb\xfc' \
1467
'\x40\xe4\xfd\x10' '\x37\x54\x00\x00' \
1468
'\x00\x00\x00\x00' '\x00\x00\x00\x00' \
1472
self.req_bin_0 = b'\x19\x01\x00\x0b' b'\x51\x9d\x00\x98' \
1473
b'\x5f\x09\xe0\xf8' b'\x0c\x00\x00\x00' \
1474
b'\x4e\xce\xfa\x94' b'\xcd\x42\xdb\xfc' \
1475
b'\x40\xe4\xfd\x10' b'\x37\x54\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
'keyboard_mode': 1,
1501
1509
'cursor': 17101598,
1503
self.req_bin_0 = '\x1a\x01\x00\x06' '\x7d\x75\x91\xbc' \
1504
'\x08\x1b\x00\x01' '\x76\x82\xb9\x57' \
1505
'\x01\x04\xf3\x1e' '\x4e\x77\x17\xcc'
1511
self.req_bin_0 = b'\x1a\x01\x00\x06' b'\x7d\x75\x91\xbc' \
1512
b'\x08\x1b\x00\x01' b'\x76\x82\xb9\x57' \
1513
b'\x01\x04\xf3\x1e' b'\x4e\x77\x17\xcc'
1507
1515
self.reply_args_0 = {
1508
1516
'sequence_number': 47539,
1511
self.reply_bin_0 = '\x01\x95\xb9\xb3' '\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\x95\xb9\xb3' 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
'pointer_mode': 1,
1685
1693
'keyboard_mode': 1,
1687
self.req_bin_0 = '\x1f\x00\x00\x04' '\x04\x89\xaf\x67' \
1688
'\x5d\x23\x78\xd9' '\x01\x01\x00\x00'
1695
self.req_bin_0 = b'\x1f\x00\x00\x04' b'\x04\x89\xaf\x67' \
1696
b'\x5d\x23\x78\xd9' b'\x01\x01\x00\x00'
1690
1698
self.reply_args_0 = {
1691
1699
'sequence_number': 9648,
1694
self.reply_bin_0 = '\x01\x81\x25\xb0' '\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\x81\x25\xb0' 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
'start': 1520150500,
1973
1981
'stop': 11115313,
1975
self.req_bin_0 = '\x27\x00\x00\x04' '\x32\x49\x8f\xf4' \
1976
'\x5a\x9b\xa7\xe4' '\x00\xa9\x9b\x31'
1983
self.req_bin_0 = b'\x27\x00\x00\x04' b'\x32\x49\x8f\xf4' \
1984
b'\x5a\x9b\xa7\xe4' b'\x00\xa9\x9b\x31'
1978
1986
self.reply_args_0 = {
1979
1987
'sequence_number': 52222,
1980
1988
'events': [{'time': 2107444516, 'x': -649, 'y': -11631}, {'time': 1827536960, 'x': -18061, 'y': -2301}, {'time': 554175146, 'x': -32111, 'y': -13522}, {'time': 608168588, 'x': -5963, 'y': -24618}, {'time': 590416221, 'x': -3325, 'y': -19656}],
1982
self.reply_bin_0 = '\x01\x00\xcb\xfe' '\x00\x00\x00\x0a' \
1983
'\x00\x00\x00\x05' '\x00\x00\x00\x00' \
1984
'\x00\x00\x00\x00' '\x00\x00\x00\x00' \
1985
'\x00\x00\x00\x00' '\x00\x00\x00\x00' \
1986
'\x7d\x9d\x0d\x24' '\xfd\x77\xd2\x91' \
1987
'\x6c\xee\x00\x40' '\xb9\x73\xf7\x03' \
1988
'\x21\x08\x0a\xaa' '\x82\x91\xcb\x2e' \
1989
'\x24\x3f\xea\x8c' '\xe8\xb5\x9f\xd6' \
1990
'\x23\x31\x09\x5d' '\xf3\x03\xb3\x38'
1990
self.reply_bin_0 = b'\x01\x00\xcb\xfe' b'\x00\x00\x00\x0a' \
1991
b'\x00\x00\x00\x05' 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'\x7d\x9d\x0d\x24' b'\xfd\x77\xd2\x91' \
1995
b'\x6c\xee\x00\x40' b'\xb9\x73\xf7\x03' \
1996
b'\x21\x08\x0a\xaa' b'\x82\x91\xcb\x2e' \
1997
b'\x24\x3f\xea\x8c' b'\xe8\xb5\x9f\xd6' \
1998
b'\x23\x31\x09\x5d' b'\xf3\x03\xb3\x38'
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\x00\x01'
2223
self.req_bin_0 = b'\x2c\x00\x00\x01'
2217
2225
self.reply_args_0 = {
2218
2226
'sequence_number': 16233,
2219
2227
'map': [186, 167, 191, 213, 241, 231, 234, 175, 154, 169, 132, 146, 215, 191, 196, 212, 158, 156, 177, 233, 220, 192, 130, 226, 181, 233, 238, 141, 129, 215, 245, 215],
2221
self.reply_bin_0 = '\x01\x00\x3f\x69' '\x00\x00\x00\x02' \
2222
'\xba\xa7\xbf\xd5' '\xf1\xe7\xea\xaf' \
2223
'\x9a\xa9\x84\x92' '\xd7\xbf\xc4\xd4' \
2224
'\x9e\x9c\xb1\xe9' '\xdc\xc0\x82\xe2' \
2225
'\xb5\xe9\xee\x8d' '\x81\xd7\xf5\xd7'
2229
self.reply_bin_0 = b'\x01\x00\x3f\x69' b'\x00\x00\x00\x02' \
2230
b'\xba\xa7\xbf\xd5' b'\xf1\xe7\xea\xaf' \
2231
b'\x9a\xa9\x84\x92' b'\xd7\xbf\xc4\xd4' \
2232
b'\x9e\x9c\xb1\xe9' b'\xdc\xc0\x82\xe2' \
2233
b'\xb5\xe9\xee\x8d' b'\x81\xd7\xf5\xd7'
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
'font_descent': -23067,
2343
2351
'max_bounds': {'descent': -24292, 'ascent': -26972, 'character_width': -19286, 'left_side_bearing': -16363, 'right_side_bearing': -3149, 'attributes': 35968},
2345
self.reply_bin_0 = '\x01\x00\x22\xad' '\x00\x00\x00\x12' \
2346
'\xae\xfc\xab\x3e' '\xeb\x5a\x96\x67' \
2347
'\x8b\x8b\x2c\x80' '\x00\x00\x00\x00' \
2348
'\xc0\x15\xf3\xb3' '\xb4\xaa\x96\xa4' \
2349
'\xa1\x1c\x8c\x80' '\x00\x00\x00\x00' \
2350
'\xc0\xd0\x09\xd4' '\x23\x22\x00\x01' \
2351
'\x8f\xbe\xa8\x01' '\xc2\xe2\xa5\xe5' \
2352
'\x00\x00\x00\x03' '\x56\x76\x30\xf3' \
2353
'\x7d\xc9\x5e\x19' '\xee\x57\xd9\x6d' \
2354
'\x90\x97\xc7\x8a' '\xfe\xb5\xd7\x97' \
2355
'\xb0\x53\x9d\x9d' '\xee\x4c\xe7\x7a' \
2356
'\xb6\xcd\x73\x24' '\xb1\x9c\xfc\x76' \
2357
'\xaa\xa1\xf6\xb6' '\xb8\x33\x86\x51'
2353
self.reply_bin_0 = b'\x01\x00\x22\xad' b'\x00\x00\x00\x12' \
2354
b'\xae\xfc\xab\x3e' b'\xeb\x5a\x96\x67' \
2355
b'\x8b\x8b\x2c\x80' b'\x00\x00\x00\x00' \
2356
b'\xc0\x15\xf3\xb3' b'\xb4\xaa\x96\xa4' \
2357
b'\xa1\x1c\x8c\x80' b'\x00\x00\x00\x00' \
2358
b'\xc0\xd0\x09\xd4' b'\x23\x22\x00\x01' \
2359
b'\x8f\xbe\xa8\x01' b'\xc2\xe2\xa5\xe5' \
2360
b'\x00\x00\x00\x03' b'\x56\x76\x30\xf3' \
2361
b'\x7d\xc9\x5e\x19' b'\xee\x57\xd9\x6d' \
2362
b'\x90\x97\xc7\x8a' b'\xfe\xb5\xd7\x97' \
2363
b'\xb0\x53\x9d\x9d' b'\xee\x4c\xe7\x7a' \
2364
b'\xb6\xcd\x73\x24' b'\xb1\x9c\xfc\x76' \
2365
b'\xaa\xa1\xf6\xb6' b'\xb8\x33\x86\x51'
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
'max_names': 53961,
2464
2472
'pattern': 'bhazr',
2466
self.req_bin_0 = '\x31\x00\x00\x04' '\xd2\xc9\x00\x05' \
2467
'\x62\x68\x61\x7a' '\x72\x00\x00\x00'
2474
self.req_bin_0 = b'\x31\x00\x00\x04' b'\xd2\xc9\x00\x05' \
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': 38267,
2473
self.reply_bin_0 = '\x01\x00\x95\x7b' '\x00\x00\x00\x05' \
2474
'\x00\x03\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\x95\x7b' b'\x00\x00\x00\x05' \
2482
b'\x00\x03\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
'font_descent': -28978,
2543
2551
'max_bounds': {'descent': -20692, 'ascent': -6999, 'character_width': -15180, 'left_side_bearing': -7789, 'right_side_bearing': -5339, 'attributes': 1068},
2545
self.reply_bin_0 = '\x01\x08\x4e\x2e' '\x00\x00\x00\x0b' \
2546
'\x8b\xb9\x83\x5c' '\xcd\x1e\xc6\x49' \
2547
'\x93\x43\x09\xa1' '\x00\x00\x00\x00' \
2548
'\xe1\x93\xeb\x25' '\xc4\xb4\xe4\xa9' \
2549
'\xaf\x2c\x04\x2c' '\x00\x00\x00\x00' \
2550
'\x68\x0e\x09\xaf' '\x42\x91\x00\x01' \
2551
'\xc0\xd6\xd9\x00' '\x88\xaa\x8e\xce' \
2552
'\x76\x53\x9a\xa2' '\x19\xfc\x2b\xb0' \
2553
'\x7d\xca\x9c\xc9' '\x66\x6f\x6e\x74' \
2553
self.reply_bin_0 = b'\x01\x08\x4e\x2e' b'\x00\x00\x00\x0b' \
2554
b'\x8b\xb9\x83\x5c' b'\xcd\x1e\xc6\x49' \
2555
b'\x93\x43\x09\xa1' b'\x00\x00\x00\x00' \
2556
b'\xe1\x93\xeb\x25' b'\xc4\xb4\xe4\xa9' \
2557
b'\xaf\x2c\x04\x2c' b'\x00\x00\x00\x00' \
2558
b'\x68\x0e\x09\xaf' b'\x42\x91\x00\x01' \
2559
b'\xc0\xd6\xd9\x00' b'\x88\xaa\x8e\xce' \
2560
b'\x76\x53\x9a\xa2' b'\x19\xfc\x2b\xb0' \
2561
b'\x7d\xca\x9c\xc9' 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\x00\x01'
2658
self.req_bin_0 = b'\x34\x00\x00\x01'
2652
2660
self.reply_args_0 = {
2653
2661
'sequence_number': 21510,
2654
2662
'paths': ['path1', 'path2232'],
2656
self.reply_bin_0 = '\x01\x00\x54\x06' '\x00\x00\x00\x04' \
2657
'\x00\x02\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\x54\x06' b'\x00\x00\x00\x04' \
2665
b'\x00\x02\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 = {
2664
2672
'sequence_number': 62463,
2667
self.reply_bin_1 = '\x01\x00\xf3\xff' '\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\xf3\xff' 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
'drawable': 456876463,
2792
2800
'attrs': {'dashes': 183, 'fill_rule': 0, 'clip_mask': 620422624, 'plane_mask': 1797423280, 'line_style': 1, 'tile': 77620460, 'arc_mode': 0, 'clip_y_origin': -7419, 'dash_offset': 62459, 'line_width': 50494, 'background': 44336037, 'clip_x_origin': -32045, 'join_style': 2, 'graphics_exposures': 0, 'font': 95118395, 'tile_stipple_y_origin': -17619, 'stipple': 631657813, 'fill_style': 0, 'cap_style': 0, 'subwindow_mode': 0, 'tile_stipple_x_origin': -12494, 'foreground': 2096879871, 'function': 10},
2794
self.req_bin_0 = '\x37\x00\x00\x1b' '\x3f\x38\x5c\x6a' \
2795
'\x1b\x3b\x61\xaf' '\x00\x7f\xff\xff' \
2796
'\x0a\x00\x00\x00' '\x6b\x22\x80\xb0' \
2797
'\x7c\xfb\xd8\xff' '\x02\xa4\x83\xa5' \
2798
'\xc5\x3e\x00\x00' '\x01\x00\x00\x00' \
2799
'\x00\x00\x00\x00' '\x02\x00\x00\x00' \
2800
'\x00\x00\x00\x00' '\x00\x00\x00\x00' \
2801
'\x04\xa0\x64\xec' '\x25\xa6\x55\x55' \
2802
'\xcf\x32\x00\x00' '\xbb\x2d\x00\x00' \
2803
'\x05\xab\x64\x3b' '\x00\x00\x00\x00' \
2804
'\x00\x00\x00\x00' '\x82\xd3\x00\x00' \
2805
'\xe3\x05\x00\x00' '\x24\xfa\xe5\xe0' \
2806
'\xf3\xfb\x00\x00' '\xb7\x00\x00\x00' \
2802
self.req_bin_0 = b'\x37\x00\x00\x1b' b'\x3f\x38\x5c\x6a' \
2803
b'\x1b\x3b\x61\xaf' b'\x00\x7f\xff\xff' \
2804
b'\x0a\x00\x00\x00' b'\x6b\x22\x80\xb0' \
2805
b'\x7c\xfb\xd8\xff' b'\x02\xa4\x83\xa5' \
2806
b'\xc5\x3e\x00\x00' b'\x01\x00\x00\x00' \
2807
b'\x00\x00\x00\x00' b'\x02\x00\x00\x00' \
2808
b'\x00\x00\x00\x00' b'\x00\x00\x00\x00' \
2809
b'\x04\xa0\x64\xec' b'\x25\xa6\x55\x55' \
2810
b'\xcf\x32\x00\x00' b'\xbb\x2d\x00\x00' \
2811
b'\x05\xab\x64\x3b' b'\x00\x00\x00\x00' \
2812
b'\x00\x00\x00\x00' b'\x82\xd3\x00\x00' \
2813
b'\xe3\x05\x00\x00' b'\x24\xfa\xe5\xe0' \
2814
b'\xf3\xfb\x00\x00' b'\xb7\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
'attrs': {'dashes': 249, 'fill_rule': 1, 'clip_mask': 496525721, 'plane_mask': 1467281901, 'line_style': 2, 'tile': 1713935374, 'arc_mode': 0, 'clip_y_origin': -24572, 'dash_offset': 46636, 'line_width': 61036, 'background': 1598773587, 'clip_x_origin': -19725, 'join_style': 1, 'graphics_exposures': 0, 'font': 429323306, 'tile_stipple_y_origin': -11767, 'stipple': 1365263649, 'fill_style': 2, 'cap_style': 1, 'subwindow_mode': 1, 'tile_stipple_x_origin': -23501, 'foreground': 1272378077, 'function': 11},
2833
2841
'gc': 518903558,
2835
self.req_bin_0 = '\x38\x00\x00\x1a' '\x1e\xed\xd7\x06' \
2836
'\x00\x7f\xff\xff' '\x0b\x00\x00\x00' \
2837
'\x57\x74\xf1\xed' '\x4b\xd6\xf2\xdd' \
2838
'\x5f\x4b\x59\x53' '\xee\x6c\x00\x00' \
2839
'\x02\x00\x00\x00' '\x01\x00\x00\x00' \
2840
'\x01\x00\x00\x00' '\x02\x00\x00\x00' \
2841
'\x01\x00\x00\x00' '\x66\x28\x94\x0e' \
2842
'\x51\x60\x45\x21' '\xa4\x33\x00\x00' \
2843
'\xd2\x09\x00\x00' '\x19\x96\xf4\x2a' \
2844
'\x01\x00\x00\x00' '\x00\x00\x00\x00' \
2845
'\xb2\xf3\x00\x00' '\xa0\x04\x00\x00' \
2846
'\x1d\x98\x61\x99' '\xb6\x2c\x00\x00' \
2847
'\xf9\x00\x00\x00' '\x00\x00\x00\x00'
2843
self.req_bin_0 = b'\x38\x00\x00\x1a' b'\x1e\xed\xd7\x06' \
2844
b'\x00\x7f\xff\xff' b'\x0b\x00\x00\x00' \
2845
b'\x57\x74\xf1\xed' b'\x4b\xd6\xf2\xdd' \
2846
b'\x5f\x4b\x59\x53' b'\xee\x6c\x00\x00' \
2847
b'\x02\x00\x00\x00' b'\x01\x00\x00\x00' \
2848
b'\x01\x00\x00\x00' b'\x02\x00\x00\x00' \
2849
b'\x01\x00\x00\x00' b'\x66\x28\x94\x0e' \
2850
b'\x51\x60\x45\x21' b'\xa4\x33\x00\x00' \
2851
b'\xd2\x09\x00\x00' b'\x19\x96\xf4\x2a' \
2852
b'\x01\x00\x00\x00' b'\x00\x00\x00\x00' \
2853
b'\xb2\xf3\x00\x00' b'\xa0\x04\x00\x00' \
2854
b'\x1d\x98\x61\x99' b'\xb6\x2c\x00\x00' \
2855
b'\xf9\x00\x00\x00' b'\x00\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:
3229
3237
'gc': 410140275,
3230
3238
'rectangles': [{'height': 63567, 'x': -16992, 'width': 11122, 'y': -21320}, {'height': 34652, 'x': -18051, 'width': 59622, 'y': -30426}, {'height': 45646, 'x': -1111, 'width': 46231, 'y': -25261}],
3232
self.req_bin_0 = '\x43\x00\x00\x09' '\x72\xe3\x09\x3d' \
3233
'\x18\x72\x3e\x73' '\xbd\xa0\xac\xb8' \
3234
'\x2b\x72\xf8\x4f' '\xb9\x7d\x89\x26' \
3235
'\xe8\xe6\x87\x5c' '\xfb\xa9\x9d\x53' \
3240
self.req_bin_0 = b'\x43\x00\x00\x09' b'\x72\xe3\x09\x3d' \
3241
b'\x18\x72\x3e\x73' b'\xbd\xa0\xac\xb8' \
3242
b'\x2b\x72\xf8\x4f' b'\xb9\x7d\x89\x26' \
3243
b'\xe8\xe6\x87\x5c' b'\xfb\xa9\x9d\x53' \
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:
3447
3455
'visual': 1108632607,
3450
self.reply_bin_0 = '\x01\xb5\xd6\xd5' '\x00\x00\x00\x07' \
3451
'\x42\x14\x64\x1f' '\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\xb5\xd6\xd5' b'\x00\x00\x00\x07' \
3459
b'\x42\x14\x64\x1f' 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:
3775
3783
self.req_args_0 = {
3776
3784
'window': 1517864638,
3778
self.req_bin_0 = '\x53\x00\x00\x02' '\x5a\x78\xc6\xbe'
3786
self.req_bin_0 = b'\x53\x00\x00\x02' b'\x5a\x78\xc6\xbe'
3780
3788
self.reply_args_0 = {
3781
3789
'cmaps': [2146327722, 1361260227],
3782
3790
'sequence_number': 61652,
3784
self.reply_bin_0 = '\x01\x00\xf0\xd4' '\x00\x00\x00\x02' \
3785
'\x00\x02\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
'\x7f\xee\x5c\xaa' '\x51\x23\x2e\xc3'
3792
self.reply_bin_0 = b'\x01\x00\xf0\xd4' b'\x00\x00\x00\x02' \
3793
b'\x00\x02\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'\x7f\xee\x5c\xaa' b'\x51\x23\x2e\xc3'
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
'cmap': 675372338,
3958
3966
'contiguous': 1,
3960
self.req_bin_0 = '\x56\x01\x00\x03' '\x28\x41\x5d\x32' \
3968
self.req_bin_0 = b'\x56\x01\x00\x03' b'\x28\x41\x5d\x32' \
3963
3971
self.reply_args_0 = {
3964
3972
'masks': [733927381, 1023311668, 595898647],
3965
3973
'pixels': [693075497, 1294879029, 1478712895, 1781963728, 1442185575, 1654003869, 787619123, 1049825849, 1773935772, 1689075922, 1626562257, 177731275, 661046122, 1970509470, 1918486395, 688539096, 41044851],
3966
3974
'sequence_number': 54025,
3968
self.reply_bin_0 = '\x01\x00\xd3\x09' '\x00\x00\x00\x14' \
3969
'\x00\x11\x00\x03' '\x00\x00\x00\x00' \
3970
'\x00\x00\x00\x00' '\x00\x00\x00\x00' \
3971
'\x00\x00\x00\x00' '\x00\x00\x00\x00' \
3972
'\x29\x4f\x7e\x29' '\x4d\x2e\x49\x35' \
3973
'\x58\x23\x5e\x3f' '\x6a\x36\x9b\xd0' \
3974
'\x55\xf6\x01\x67' '\x62\x96\x18\x9d' \
3975
'\x2e\xf2\x1d\x33' '\x3e\x93\x12\x39' \
3976
'\x69\xbc\x1c\x9c' '\x64\xad\x40\xd2' \
3977
'\x60\xf3\x5e\xd1' '\x0a\x97\xf6\xcb' \
3978
'\x27\x66\xc3\x6a' '\x75\x73\x96\x9e' \
3979
'\x72\x59\xc7\x7b' '\x29\x0a\x45\xd8' \
3980
'\x02\x72\x4b\x73' '\x2b\xbe\xd7\xd5' \
3981
'\x3c\xfe\x7f\x34' '\x23\x84\xb1\x17'
3976
self.reply_bin_0 = b'\x01\x00\xd3\x09' b'\x00\x00\x00\x14' \
3977
b'\x00\x11\x00\x03' 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'\x29\x4f\x7e\x29' b'\x4d\x2e\x49\x35' \
3981
b'\x58\x23\x5e\x3f' b'\x6a\x36\x9b\xd0' \
3982
b'\x55\xf6\x01\x67' b'\x62\x96\x18\x9d' \
3983
b'\x2e\xf2\x1d\x33' b'\x3e\x93\x12\x39' \
3984
b'\x69\xbc\x1c\x9c' b'\x64\xad\x40\xd2' \
3985
b'\x60\xf3\x5e\xd1' b'\x0a\x97\xf6\xcb' \
3986
b'\x27\x66\xc3\x6a' b'\x75\x73\x96\x9e' \
3987
b'\x72\x59\xc7\x7b' b'\x29\x0a\x45\xd8' \
3988
b'\x02\x72\x4b\x73' b'\x2b\xbe\xd7\xd5' \
3989
b'\x3c\xfe\x7f\x34' b'\x23\x84\xb1\x17'
3983
3991
self.reply_args_1 = {
3986
3994
'sequence_number': 6273,
3988
self.reply_bin_1 = '\x01\x00\x18\x81' '\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\x18\x81' 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
'blue_mask': 44676180,
4067
4075
'red_mask': 734623206,
4069
self.reply_bin_0 = '\x01\x00\x8d\x4f' '\x00\x00\x00\x04' \
4070
'\x00\x04\x00\x00' '\x2b\xc9\x75\xe6' \
4071
'\x0f\xd9\x22\x87' '\x02\xa9\xb4\x54' \
4072
'\x00\x00\x00\x00' '\x00\x00\x00\x00' \
4073
'\x1d\x52\xbe\x09' '\x4d\x99\x83\xbe' \
4074
'\x5f\xa5\xda\xfd' '\x54\x90\x6c\x90'
4077
self.reply_bin_0 = b'\x01\x00\x8d\x4f' b'\x00\x00\x00\x04' \
4078
b'\x00\x04\x00\x00' b'\x2b\xc9\x75\xe6' \
4079
b'\x0f\xd9\x22\x87' b'\x02\xa9\xb4\x54' \
4080
b'\x00\x00\x00\x00' b'\x00\x00\x00\x00' \
4081
b'\x1d\x52\xbe\x09' b'\x4d\x99\x83\xbe' \
4082
b'\x5f\xa5\xda\xfd' b'\x54\x90\x6c\x90'
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
'pixels': [61281082, 398475082, 1660604639, 1516738417, 1211104329, 105034864, 884930615, 902914796, 288637231, 2097165249, 1171127263, 1027274519, 806213035, 1485898709, 542709465, 169067149, 1230881159],
4119
4127
'plane_mask': 1204733200,
4121
self.req_bin_0 = '\x58\x00\x00\x14' '\x2b\x55\x43\xd8' \
4122
'\x47\xce\xc5\x10' '\x03\xa7\x13\x3a' \
4123
'\x17\xc0\x3f\x4a' '\x62\xfa\xd0\xdf' \
4124
'\x5a\x67\x97\x71' '\x48\x2f\xfc\x49' \
4125
'\x06\x42\xb4\x70' '\x34\xbe\xf8\x37' \
4126
'\x35\xd1\x62\xec' '\x11\x34\x41\x2f' \
4127
'\x7d\x00\x33\xc1' '\x45\xcd\xfb\xdf' \
4128
'\x3d\x3a\xf7\x17' '\x30\x0d\xd5\xab' \
4129
'\x58\x91\x03\xd5' '\x20\x59\x16\xd9' \
4130
'\x0a\x13\xc2\x8d' '\x49\x5d\xc1\x87'
4129
self.req_bin_0 = b'\x58\x00\x00\x14' b'\x2b\x55\x43\xd8' \
4130
b'\x47\xce\xc5\x10' b'\x03\xa7\x13\x3a' \
4131
b'\x17\xc0\x3f\x4a' b'\x62\xfa\xd0\xdf' \
4132
b'\x5a\x67\x97\x71' b'\x48\x2f\xfc\x49' \
4133
b'\x06\x42\xb4\x70' b'\x34\xbe\xf8\x37' \
4134
b'\x35\xd1\x62\xec' b'\x11\x34\x41\x2f' \
4135
b'\x7d\x00\x33\xc1' b'\x45\xcd\xfb\xdf' \
4136
b'\x3d\x3a\xf7\x17' b'\x30\x0d\xd5\xab' \
4137
b'\x58\x91\x03\xd5' b'\x20\x59\x16\xd9' \
4138
b'\x0a\x13\xc2\x8d' b'\x49\x5d\xc1\x87'
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
'cmap': 501035281,
4156
4164
'items': [{'red': 27925, 'pixel': 1094971765, 'green': 3673, 'flags': 189, 'blue': 31593}, {'red': 41633, 'pixel': 1330003189, 'green': 56186, 'flags': 178, 'blue': 30263}, {'red': 36007, 'pixel': 1813524037, 'green': 29697, 'flags': 224, 'blue': 14071}, {'red': 45716, 'pixel': 1987610486, 'green': 55405, 'flags': 200, 'blue': 35734}],
4158
self.req_bin_0 = '\x59\x00\x00\x0e' '\x1d\xdd\x31\x11' \
4159
'\x41\x43\xf1\x75' '\x6d\x15\x0e\x59' \
4160
'\x7b\x69\xbd\x00' '\x4f\x46\x3c\xf5' \
4161
'\xa2\xa1\xdb\x7a' '\x76\x37\xb2\x00' \
4162
'\x6c\x18\x2e\x45' '\x8c\xa7\x74\x01' \
4163
'\x36\xf7\xe0\x00' '\x76\x78\x87\x76' \
4164
'\xb2\x94\xd8\x6d' '\x8b\x96\xc8\x00'
4166
self.req_bin_0 = b'\x59\x00\x00\x0e' b'\x1d\xdd\x31\x11' \
4167
b'\x41\x43\xf1\x75' b'\x6d\x15\x0e\x59' \
4168
b'\x7b\x69\xbd\x00' b'\x4f\x46\x3c\xf5' \
4169
b'\xa2\xa1\xdb\x7a' b'\x76\x37\xb2\x00' \
4170
b'\x6c\x18\x2e\x45' b'\x8c\xa7\x74\x01' \
4171
b'\x36\xf7\xe0\x00' b'\x76\x78\x87\x76' \
4172
b'\xb2\x94\xd8\x6d' b'\x8b\x96\xc8\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': 596369797,
4222
4230
'pixels': [1018587496, 1553480933, 952694607, 341816269, 306591348, 1178729919, 173027853, 875811363],
4224
self.req_bin_0 = '\x5b\x00\x00\x0a' '\x23\x8b\xe1\x85' \
4225
'\x3c\xb6\x69\x68' '\x5c\x98\x3c\xe5' \
4226
'\x38\xc8\xf7\x4f' '\x14\x5f\xb3\xcd' \
4227
'\x12\x46\x36\x74' '\x46\x41\xfd\xbf' \
4228
'\x0a\x50\x32\x0d' '\x34\x33\xd2\x23'
4232
self.req_bin_0 = b'\x5b\x00\x00\x0a' b'\x23\x8b\xe1\x85' \
4233
b'\x3c\xb6\x69\x68' b'\x5c\x98\x3c\xe5' \
4234
b'\x38\xc8\xf7\x4f' b'\x14\x5f\xb3\xcd' \
4235
b'\x12\x46\x36\x74' b'\x46\x41\xfd\xbf' \
4236
b'\x0a\x50\x32\x0d' b'\x34\x33\xd2\x23'
4230
4238
self.reply_args_0 = {
4231
4239
'colors': [{'red': 6715, 'blue': 40144, 'green': 56664}, {'red': 5799, 'blue': 22078, 'green': 35523}, {'red': 60111, 'blue': 58654, 'green': 25206}, {'red': 7433, 'blue': 60908, 'green': 14468}, {'red': 31213, 'blue': 9298, 'green': 27481}],
4232
4240
'sequence_number': 60323,
4234
self.reply_bin_0 = '\x01\x00\xeb\xa3' '\x00\x00\x00\x0a' \
4235
'\x00\x05\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
'\x1a\x3b\xdd\x58' '\x9c\xd0\x00\x00' \
4239
'\x16\xa7\x8a\xc3' '\x56\x3e\x00\x00' \
4240
'\xea\xcf\x62\x76' '\xe5\x1e\x00\x00' \
4241
'\x1d\x09\x38\x84' '\xed\xec\x00\x00' \
4242
'\x79\xed\x6b\x59' '\x24\x52\x00\x00'
4242
self.reply_bin_0 = b'\x01\x00\xeb\xa3' b'\x00\x00\x00\x0a' \
4243
b'\x00\x05\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'\x1a\x3b\xdd\x58' b'\x9c\xd0\x00\x00' \
4247
b'\x16\xa7\x8a\xc3' b'\x56\x3e\x00\x00' \
4248
b'\xea\xcf\x62\x76' b'\xe5\x1e\x00\x00' \
4249
b'\x1d\x09\x38\x84' b'\xed\xec\x00\x00' \
4250
b'\x79\xed\x6b\x59' b'\x24\x52\x00\x00'
4244
4252
self.req_args_1 = {
4245
4253
'cmap': 79317049,
4248
self.req_bin_1 = '\x5b\x00\x00\x02' '\x04\xba\x48\x39'
4256
self.req_bin_1 = b'\x5b\x00\x00\x02' b'\x04\xba\x48\x39'
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\x00\x01'
4639
self.req_bin_0 = b'\x63\x00\x00\x01'
4633
4641
self.reply_args_0 = {
4634
4642
'sequence_number': 20200,
4635
4643
'names': ['XTRA', 'XTRA-II'],
4637
self.reply_bin_0 = '\x01\x02\x4e\xe8' '\x00\x00\x00\x04' \
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\x4e\xe8' b'\x00\x00\x00\x04' \
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
'keysyms': [[707837223, 99294840, 1205405602], [67157514, 879853050, 2059131033], [1139736188, 578113249, 1525786315], [1335349176, 246731334, 277761436], [1386594542, 1676932187, 1862777168], [535892916, 342718655, 195574000], [5712156, 1820472637, 848853860], [1123197289, 1664064022, 94999154], [380150420, 402902535, 1061375041], [510686316, 502245882, 422893644], [1423643601, 194077695, 403885178], [1571826296, 529249772, 623556591], [720045879, 37553034, 955963792], [513407882, 861125615, 219940695], [184890179, 472466494, 1649347894], [1679171989, 1991748404, 1674460475], [1762342934, 276695222, 1941684480], [886658026, 1860690072, 577030090], [227169721, 1390318675, 321524615], [2144591365, 545119116, 404205206]],
4686
4694
'first_keycode': 250,
4688
self.req_bin_0 = '\x64\x14\x00\x3e' '\xfa\x03\x00\x00' \
4689
'\x2a\x30\xbd\x27' '\x05\xeb\x1e\x78' \
4690
'\x47\xd9\x07\xa2' '\x04\x00\xbe\x0a' \
4691
'\x34\x71\x7d\xfa' '\x7a\xbb\xd8\x99' \
4692
'\x43\xee\xfe\x7c' '\x22\x75\x4e\xe1' \
4693
'\x5a\xf1\xa6\xcb' '\x4f\x97\xcf\xb8' \
4694
'\x0e\xb4\xd2\x46' '\x10\x8e\x4d\x9c' \
4695
'\x52\xa5\xc0\xee' '\x63\xf3\xf4\x5b' \
4696
'\x6f\x07\xb9\x50' '\x1f\xf1\x13\xb4' \
4697
'\x14\x6d\x78\xbf' '\x0b\xa8\x38\xf0' \
4698
'\x00\x57\x29\x1c' '\x6c\x82\x35\x3d' \
4699
'\x32\x98\x7b\x64' '\x42\xf2\xa1\x69' \
4700
'\x63\x2f\x9a\x16' '\x05\xa9\x92\x72' \
4701
'\x16\xa8\xa2\x94' '\x18\x03\xce\x07' \
4702
'\x3f\x43\x4c\x41' '\x1e\x70\x74\x6c' \
4703
'\x1d\xef\xa9\xfa' '\x19\x34\xd8\x4c' \
4704
'\x54\xdb\x13\xd1' '\x0b\x91\x63\xff' \
4705
'\x18\x12\xcc\x7a' '\x5d\xb0\x2a\x78' \
4706
'\x1f\x8b\xb5\xec' '\x25\x2a\xb7\xef' \
4707
'\x2a\xeb\x07\x37' '\x02\x3d\x03\x8a' \
4708
'\x38\xfa\xd9\x90' '\x1e\x99\xfb\x8a' \
4709
'\x33\x53\xbb\xef' '\x0d\x1c\x07\x57' \
4710
'\x0b\x05\x33\x43' '\x1c\x29\x44\x3e' \
4711
'\x62\x4f\x0d\x36' '\x64\x16\x21\x95' \
4712
'\x76\xb7\xab\x34' '\x63\xce\x3d\x3b' \
4713
'\x69\x0b\x38\x16' '\x10\x7e\x08\xb6' \
4714
'\x73\xbb\xc1\x00' '\x34\xd9\x53\xea' \
4715
'\x6e\xe7\xe0\x98' '\x22\x64\xc7\xca' \
4716
'\x0d\x8a\x55\xb9' '\x52\xde\x94\x53' \
4717
'\x13\x2a\x13\x87' '\x7f\xd3\xde\x05' \
4718
'\x20\x7d\xdb\x8c' '\x18\x17\xae\x96'
4696
self.req_bin_0 = b'\x64\x14\x00\x3e' b'\xfa\x03\x00\x00' \
4697
b'\x2a\x30\xbd\x27' b'\x05\xeb\x1e\x78' \
4698
b'\x47\xd9\x07\xa2' b'\x04\x00\xbe\x0a' \
4699
b'\x34\x71\x7d\xfa' b'\x7a\xbb\xd8\x99' \
4700
b'\x43\xee\xfe\x7c' b'\x22\x75\x4e\xe1' \
4701
b'\x5a\xf1\xa6\xcb' b'\x4f\x97\xcf\xb8' \
4702
b'\x0e\xb4\xd2\x46' b'\x10\x8e\x4d\x9c' \
4703
b'\x52\xa5\xc0\xee' b'\x63\xf3\xf4\x5b' \
4704
b'\x6f\x07\xb9\x50' b'\x1f\xf1\x13\xb4' \
4705
b'\x14\x6d\x78\xbf' b'\x0b\xa8\x38\xf0' \
4706
b'\x00\x57\x29\x1c' b'\x6c\x82\x35\x3d' \
4707
b'\x32\x98\x7b\x64' b'\x42\xf2\xa1\x69' \
4708
b'\x63\x2f\x9a\x16' b'\x05\xa9\x92\x72' \
4709
b'\x16\xa8\xa2\x94' b'\x18\x03\xce\x07' \
4710
b'\x3f\x43\x4c\x41' b'\x1e\x70\x74\x6c' \
4711
b'\x1d\xef\xa9\xfa' b'\x19\x34\xd8\x4c' \
4712
b'\x54\xdb\x13\xd1' b'\x0b\x91\x63\xff' \
4713
b'\x18\x12\xcc\x7a' b'\x5d\xb0\x2a\x78' \
4714
b'\x1f\x8b\xb5\xec' b'\x25\x2a\xb7\xef' \
4715
b'\x2a\xeb\x07\x37' b'\x02\x3d\x03\x8a' \
4716
b'\x38\xfa\xd9\x90' b'\x1e\x99\xfb\x8a' \
4717
b'\x33\x53\xbb\xef' b'\x0d\x1c\x07\x57' \
4718
b'\x0b\x05\x33\x43' b'\x1c\x29\x44\x3e' \
4719
b'\x62\x4f\x0d\x36' b'\x64\x16\x21\x95' \
4720
b'\x76\xb7\xab\x34' b'\x63\xce\x3d\x3b' \
4721
b'\x69\x0b\x38\x16' b'\x10\x7e\x08\xb6' \
4722
b'\x73\xbb\xc1\x00' b'\x34\xd9\x53\xea' \
4723
b'\x6e\xe7\xe0\x98' b'\x22\x64\xc7\xca' \
4724
b'\x0d\x8a\x55\xb9' b'\x52\xde\x94\x53' \
4725
b'\x13\x2a\x13\x87' b'\x7f\xd3\xde\x05' \
4726
b'\x20\x7d\xdb\x8c' b'\x18\x17\xae\x96'
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:
4744
4752
'first_keycode': 206,
4746
self.req_bin_0 = '\x65\x00\x00\x02' '\xce\x83\x00\x00'
4754
self.req_bin_0 = b'\x65\x00\x00\x02' b'\xce\x83\x00\x00'
4748
4756
self.reply_args_0 = {
4749
4757
'keysyms': [[1550369014, 1683205347, 1879538861], [452613596, 1132022246, 357271408], [528724632, 2118423140, 640580111], [1981239140, 195173082, 497130901], [2001675011, 809172000, 1577756130], [739794769, 1774524806, 787951551], [1784021539, 1998872082, 1747812414], [396316053, 1525431160, 1808906812], [1676662850, 1222579650, 1205117622], [396026453, 1956747483, 1762026309], [1222502216, 1488139702, 1799119214], [1504675136, 1414564657, 419659384], [1934768917, 2095924224, 590955729], [582168798, 383228141, 1552516537], [1482483262, 1041896520, 1047041873], [1932705867, 292473490, 226147737], [780322016, 1965031752, 1481062205], [89811542, 1313413666, 686267194], [237776128, 1310737228, 792176733], [849034415, 1592538831, 837355505]],
4750
4758
'sequence_number': 61409,
4752
self.reply_bin_0 = '\x01\x03\xef\xe1' '\x00\x00\x00\x3c' \
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
'\x5c\x68\xc0\xf6' '\x64\x53\xac\xe3' \
4757
'\x70\x07\x7c\xad' '\x1a\xfa\x55\xdc' \
4758
'\x43\x79\x49\xe6' '\x15\x4b\x87\x70' \
4759
'\x1f\x83\xb2\x98' '\x7e\x44\x92\x64' \
4760
'\x26\x2e\x7a\x0f' '\x76\x17\x4f\x64' \
4761
'\x0b\xa2\x1a\xda' '\x1d\xa1\x9d\x95' \
4762
'\x77\x4f\x23\x03' '\x30\x3a\xfc\x20' \
4763
'\x5e\x0a\xa5\xe2' '\x2c\x18\x5f\x51' \
4764
'\x69\xc5\x19\x86' '\x2e\xf7\x2f\xbf' \
4765
'\x6a\x56\x02\x23' '\x77\x24\x5e\x12' \
4766
'\x68\x2d\x80\x3e' '\x17\x9f\x4d\x95' \
4767
'\x5a\xec\x3b\x78' '\x6b\xd1\xba\x3c' \
4768
'\x63\xef\xd8\x42' '\x48\xdf\x15\xc2' \
4769
'\x47\xd4\xa2\xb6' '\x17\x9a\xe2\x55' \
4770
'\x74\xa1\x98\xdb' '\x69\x06\x63\x45' \
4771
'\x48\xdd\xe7\x48' '\x58\xb3\x35\xb6' \
4772
'\x6b\x3c\x61\x6e' '\x59\xaf\x85\x40' \
4773
'\x54\x50\x8b\x31' '\x19\x03\x7e\x78' \
4774
'\x73\x52\x3b\x15' '\x7c\xed\x44\x00' \
4775
'\x23\x39\x44\xd1' '\x22\xb3\x30\xde' \
4776
'\x16\xd7\x98\xed' '\x5c\x89\x85\xb9' \
4777
'\x58\x5c\xe6\x3e' '\x3e\x1a\x14\x48' \
4778
'\x3e\x68\x97\x51' '\x73\x32\xc0\x4b' \
4779
'\x11\x6e\xca\x92' '\x0d\x7a\xbd\x99' \
4780
'\x2e\x82\xc4\xe0' '\x75\x20\x01\x48' \
4781
'\x58\x47\x37\x3d' '\x05\x5a\x6a\x56' \
4782
'\x4e\x49\x1a\x22' '\x28\xe7\x9b\x3a' \
4783
'\x0e\x2c\x2d\x00' '\x4e\x20\x43\x4c' \
4784
'\x2f\x37\xa8\x5d' '\x32\x9b\x3c\xaf' \
4785
'\x5e\xec\x36\xcf' '\x31\xe9\x07\xf1'
4760
self.reply_bin_0 = b'\x01\x03\xef\xe1' b'\x00\x00\x00\x3c' \
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'\x5c\x68\xc0\xf6' b'\x64\x53\xac\xe3' \
4765
b'\x70\x07\x7c\xad' b'\x1a\xfa\x55\xdc' \
4766
b'\x43\x79\x49\xe6' b'\x15\x4b\x87\x70' \
4767
b'\x1f\x83\xb2\x98' b'\x7e\x44\x92\x64' \
4768
b'\x26\x2e\x7a\x0f' b'\x76\x17\x4f\x64' \
4769
b'\x0b\xa2\x1a\xda' b'\x1d\xa1\x9d\x95' \
4770
b'\x77\x4f\x23\x03' b'\x30\x3a\xfc\x20' \
4771
b'\x5e\x0a\xa5\xe2' b'\x2c\x18\x5f\x51' \
4772
b'\x69\xc5\x19\x86' b'\x2e\xf7\x2f\xbf' \
4773
b'\x6a\x56\x02\x23' b'\x77\x24\x5e\x12' \
4774
b'\x68\x2d\x80\x3e' b'\x17\x9f\x4d\x95' \
4775
b'\x5a\xec\x3b\x78' b'\x6b\xd1\xba\x3c' \
4776
b'\x63\xef\xd8\x42' b'\x48\xdf\x15\xc2' \
4777
b'\x47\xd4\xa2\xb6' b'\x17\x9a\xe2\x55' \
4778
b'\x74\xa1\x98\xdb' b'\x69\x06\x63\x45' \
4779
b'\x48\xdd\xe7\x48' b'\x58\xb3\x35\xb6' \
4780
b'\x6b\x3c\x61\x6e' b'\x59\xaf\x85\x40' \
4781
b'\x54\x50\x8b\x31' b'\x19\x03\x7e\x78' \
4782
b'\x73\x52\x3b\x15' b'\x7c\xed\x44\x00' \
4783
b'\x23\x39\x44\xd1' b'\x22\xb3\x30\xde' \
4784
b'\x16\xd7\x98\xed' b'\x5c\x89\x85\xb9' \
4785
b'\x58\x5c\xe6\x3e' b'\x3e\x1a\x14\x48' \
4786
b'\x3e\x68\x97\x51' b'\x73\x32\xc0\x4b' \
4787
b'\x11\x6e\xca\x92' b'\x0d\x7a\xbd\x99' \
4788
b'\x2e\x82\xc4\xe0' b'\x75\x20\x01\x48' \
4789
b'\x58\x47\x37\x3d' b'\x05\x5a\x6a\x56' \
4790
b'\x4e\x49\x1a\x22' b'\x28\xe7\x9b\x3a' \
4791
b'\x0e\x2c\x2d\x00' b'\x4e\x20\x43\x4c' \
4792
b'\x2f\x37\xa8\x5d' b'\x32\x9b\x3c\xaf' \
4793
b'\x5e\xec\x36\xcf' b'\x31\xe9\x07\xf1'
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': {'key_click_percent': -35, 'bell_percent': -53, 'led_mode': 1, 'bell_pitch': -17390, 'auto_repeat_mode': 2, 'bell_duration': -30281, 'key': 235, 'led': 192},
4830
self.req_bin_0 = '\x66\x00\x00\x0a' '\x00\x00\x00\xff' \
4831
'\xdd\x00\x00\x00' '\xcb\x00\x00\x00' \
4832
'\xbc\x12\x00\x00' '\x89\xb7\x00\x00' \
4833
'\xc0\x00\x00\x00' '\x01\x00\x00\x00' \
4834
'\xeb\x00\x00\x00' '\x02\x00\x00\x00'
4838
self.req_bin_0 = b'\x66\x00\x00\x0a' b'\x00\x00\x00\xff' \
4839
b'\xdd\x00\x00\x00' b'\xcb\x00\x00\x00' \
4840
b'\xbc\x12\x00\x00' b'\x89\xb7\x00\x00' \
4841
b'\xc0\x00\x00\x00' b'\x01\x00\x00\x00' \
4842
b'\xeb\x00\x00\x00' b'\x02\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
'led_mask': 438224369,
4870
4878
'bell_duration': 20235,
4872
self.reply_bin_0 = '\x01\x00\x75\xc5' '\x00\x00\x00\x05' \
4873
'\x1a\x1e\xc5\xf1' '\xce\xfb\x35\xd3' \
4874
'\x4f\x0b\x00\x00' '\xd9\xab\xa7\xa7' \
4875
'\xf3\xa3\x81\xef' '\xa8\x99\xe1\xc7' \
4876
'\xbd\x9b\xe4\x95' '\x94\xed\x8b\x96' \
4877
'\xd3\x85\x87\xfa' '\xbf\xa6\x92\xd4' \
4880
self.reply_bin_0 = b'\x01\x00\x75\xc5' b'\x00\x00\x00\x05' \
4881
b'\x1a\x1e\xc5\xf1' b'\xce\xfb\x35\xd3' \
4882
b'\x4f\x0b\x00\x00' b'\xd9\xab\xa7\xa7' \
4883
b'\xf3\xa3\x81\xef' b'\xa8\x99\xe1\xc7' \
4884
b'\xbd\x9b\xe4\x95' b'\x94\xed\x8b\x96' \
4885
b'\xd3\x85\x87\xfa' b'\xbf\xa6\x92\xd4' \
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\x00\x01'
5161
self.req_bin_0 = b'\x6e\x00\x00\x01'
5155
5163
self.reply_args_0 = {
5156
5164
'sequence_number': 31662,
5158
5166
'hosts': [{'family': 0, 'name': [34, 23, 178, 12]}, {'family': 0, 'name': [130, 236, 254, 15]}],
5160
self.reply_bin_0 = '\x01\x01\x7b\xae' '\x00\x00\x00\x04' \
5161
'\x00\x02\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\x00\x04' '\x22\x17\xb2\x0c' \
5165
'\x00\x00\x00\x04' '\x82\xec\xfe\x0f'
5168
self.reply_bin_0 = b'\x01\x01\x7b\xae' b'\x00\x00\x00\x04' \
5169
b'\x00\x02\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\x00\x04' b'\x22\x17\xb2\x0c' \
5173
b'\x00\x00\x00\x04' 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
'window': 109899869,
5291
5299
'properties': [1758270592, 1474783027, 1362037883, 19212066, 1095428186, 1435857629, 337040311, 1202859364, 1426187239, 725785004, 1722986690, 435243112],
5293
self.req_bin_0 = '\x72\x00\x00\x0f' '\x06\x8c\xf0\x5d' \
5294
'\x00\x0c\x96\x29' '\x68\xcd\x14\x80' \
5295
'\x57\xe7\x67\x33' '\x51\x2f\x0c\x7b' \
5296
'\x01\x25\x27\x22' '\x41\x4a\xe8\x5a' \
5297
'\x55\x95\x72\xdd' '\x14\x16\xd3\xb7' \
5298
'\x47\xb2\x2d\x64' '\x55\x01\xe3\xe7' \
5299
'\x2b\x42\x99\xac' '\x66\xb2\xb0\xc2' \
5301
self.req_bin_0 = b'\x72\x00\x00\x0f' b'\x06\x8c\xf0\x5d' \
5302
b'\x00\x0c\x96\x29' b'\x68\xcd\x14\x80' \
5303
b'\x57\xe7\x67\x33' b'\x51\x2f\x0c\x7b' \
5304
b'\x01\x25\x27\x22' b'\x41\x4a\xe8\x5a' \
5305
b'\x55\x95\x72\xdd' b'\x14\x16\xd3\xb7' \
5306
b'\x47\xb2\x2d\x64' b'\x55\x01\xe3\xe7' \
5307
b'\x2b\x42\x99\xac' b'\x66\xb2\xb0\xc2' \
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': [218, 142, 195, 250, 194],
5354
self.req_bin_0 = '\x74\x05\x00\x03' '\xda\x8e\xc3\xfa' \
5362
self.req_bin_0 = b'\x74\x05\x00\x03' b'\xda\x8e\xc3\xfa' \
5357
5365
self.reply_args_0 = {
5358
5366
'sequence_number': 11995,
5361
self.reply_bin_0 = '\x01\xbb\x2e\xdb' '\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\xbb\x2e\xdb' 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\x00\x01'
5416
self.req_bin_0 = b'\x75\x00\x00\x01'
5410
5418
self.reply_args_0 = {
5411
5419
'sequence_number': 35825,
5412
5420
'map': [165, 233, 136, 197, 230],
5414
self.reply_bin_0 = '\x01\x05\x8b\xf1' '\x00\x00\x00\x02' \
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
'\xa5\xe9\x88\xc5' '\xe6\x00\x00\x00'
5422
self.reply_bin_0 = b'\x01\x05\x8b\xf1' b'\x00\x00\x00\x02' \
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'\xa5\xe9\x88\xc5' b'\xe6\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': [[72, 169], [161, 154], [26, 10], [108, 187], [110, 198], [225, 88], [33, 66], [189, 147]],
5463
self.req_bin_0 = '\x76\x02\x00\x05' '\x48\xa9\xa1\x9a' \
5464
'\x1a\x0a\x6c\xbb' '\x6e\xc6\xe1\x58' \
5471
self.req_bin_0 = b'\x76\x02\x00\x05' b'\x48\xa9\xa1\x9a' \
5472
b'\x1a\x0a\x6c\xbb' b'\x6e\xc6\xe1\x58' \
5467
5475
self.reply_args_0 = {
5468
5476
'sequence_number': 44526,
5471
self.reply_bin_0 = '\x01\xbc\xad\xee' '\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\xbc\xad\xee' 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\x00\x01'
5526
self.req_bin_0 = b'\x77\x00\x00\x01'
5520
5528
self.reply_args_0 = {
5521
5529
'sequence_number': 58377,
5522
5530
'keycodes': [[3, 183], [213, 173], [9, 97], [35, 60], [249, 78], [175, 62], [237, 11], [26, 119]],
5524
self.reply_bin_0 = '\x01\x02\xe4\x09' '\x00\x00\x00\x04' \
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
'\x03\xb7\xd5\xad' '\x09\x61\x23\x3c' \
5529
'\xf9\x4e\xaf\x3e' '\xed\x0b\x1a\x77'
5532
self.reply_bin_0 = b'\x01\x02\xe4\x09' b'\x00\x00\x00\x04' \
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'\x03\xb7\xd5\xad' b'\x09\x61\x23\x3c' \
5537
b'\xf9\x4e\xaf\x3e' b'\xed\x0b\x1a\x77'
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: