-
Notifications
You must be signed in to change notification settings - Fork 426
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Related #1097
- Loading branch information
Showing
2 changed files
with
25 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import pytest | ||
|
||
from logitech_receiver import base | ||
|
||
|
||
@pytest.mark.parametrize( | ||
"usb_id, expected_name, expected_receiver_kind", | ||
[ | ||
("0xC548", "Bolt Receiver", "bolt"), | ||
("0xC52B", "Unifying Receiver", "unifying"), | ||
("0xC531", "Nano Receiver", "nano"), | ||
("0xC53F", "Lightspeed Receiver", None), | ||
("0xC517", "EX100 Receiver 27 Mhz", "27Mhz"), | ||
], | ||
) | ||
def test_product_information(usb_id, expected_name, expected_receiver_kind): | ||
res = base.product_information(usb_id) | ||
|
||
assert res["name"] == expected_name | ||
if expected_receiver_kind: | ||
assert res["receiver_kind"] == expected_receiver_kind |