Skip to content

Commit

Permalink
Add more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
LaStrada committed Feb 5, 2024
1 parent ba81913 commit 24e5b44
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/test_device_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ def test_device_type():
with pytest.raises(ValueError):
AirthingsDeviceType("1234")

assert AirthingsDeviceType.from_raw_value("2900") == AirthingsDeviceType.WAVE_GEN_1
assert AirthingsDeviceType.from_raw_value("2920") == AirthingsDeviceType.WAVE_MINI
assert AirthingsDeviceType.from_raw_value("2930") == AirthingsDeviceType.WAVE_PLUS
assert AirthingsDeviceType.from_raw_value("2950") == AirthingsDeviceType.WAVE_RADON

unknown_device = AirthingsDeviceType.from_raw_value("1234")
assert unknown_device == AirthingsDeviceType.UNKNOWN
assert unknown_device.product_name == "Unknown"
Expand Down

0 comments on commit 24e5b44

Please sign in to comment.