def test_set_polling_rate(self, mouse, value, expected_hid_report):
     mouse.set_polling_rate(value)
     mouse._hid_device.bytes.seek(0)
     hid_report = mouse._hid_device.bytes.read()
     assert hid_report == expected_hid_report
Example #2
0
 def test_set_polling_rate(self, mouse, value, expected_hid_report):
     mouse.set_polling_rate(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)