Add valid country tests to workday sensors (#82799)

fixes undefined
pull/82621/head^2
ark 2022-11-28 13:22:57 -08:00 committed by GitHub
parent 71eb45072c
commit eb25968b31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -125,6 +125,10 @@ class TestWorkdaySetup:
with pytest.raises(vol.Invalid):
binary_sensor.valid_country("HomeAssistantLand")
# Valid country code validation must not raise an exception
for country in ("IM", "LI", "US"):
assert binary_sensor.valid_country(country) == country
def test_setup_component_province(self):
"""Set up workday component."""
with assert_setup_component(1, "binary_sensor"):