Skip to content

Commit

Permalink
tests: Tests hidpp10
Browse files Browse the repository at this point in the history
Related #1097
  • Loading branch information
MattHag committed Feb 28, 2024
1 parent a38d193 commit 3f1a910
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions tests/logitech_receiver/test_hidpp10.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import pytest

from logitech_receiver import hidpp10


class FakeDevice:
def request(self, *params):
return b"fake request"

def read_register(self, register_number, *params):
return "fake register"


@pytest.fixture
def setup_hidpp10():
device = FakeDevice()
hid = hidpp10.Hidpp10()

yield device, hid


def test_hidpp10(setup_hidpp10):
device, hid = setup_hidpp10

firmwares = hid.get_firmware(device)

assert len(firmwares) == 3
for firmware in firmwares:
assert firmware.kind in ["Firmware", "Bootloader", "Other"]

0 comments on commit 3f1a910

Please sign in to comment.