def test_save(self, mouse):
     mouse.save()
     mouse._hid_device.bytes.seek(0)
     hid_report = mouse._hid_device.bytes.read()
     assert hid_report == b"\x02\x00\x59\x00"
Пример #2
0
 def test_save(self, mouse):
     mouse.save()
     mouse._hid_device.bytes.seek(0)
     assert mouse._hid_device.bytes.read() == b"\x02\x00\x5A\x0E"
Пример #3
0
 def test_save(self, mouse):
     mouse.save()
     mouse._hid_device.bytes.seek(0)
     hid_report = mouse._hid_device.bytes.read()
     assert len(hid_report) == 1 + 1 + 32   # report_type + report_id + data
     assert hid_report.startswith(b"\x02\x00\x09\x00")