def test_set_light_effect(self, mouse, value, expected_hid_report): mouse.set_light_effect(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)
def test_set_light_effect(self, mouse, value, expected_hid_report): mouse.set_light_effect(value) mouse._hid_device.bytes.seek(0) hid_report = mouse._hid_device.bytes.read() assert hid_report == expected_hid_report