def test_set_sensitivity2(self, mouse, value, expected_hid_report):
     mouse.set_sensitivity2(value)
     mouse._hid_device.bytes.seek(0)
     hid_report = mouse._hid_device.bytes.read()
     assert hid_report == expected_hid_report
Пример #2
0
 def test_set_sensitivity2(self, mouse, value, expected_hid_report):
     mouse.set_sensitivity2(value)
     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(expected_hid_report)