forked from pwr-Solaar/Solaar
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* test: Test base product information Related pwr-Solaar#1097 * Fix dependencies for gi
- Loading branch information
Showing
3 changed files
with
26 additions
and
2 deletions.
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
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 |