From eb25968b31dcf76d6790cee99ff30ead3d27b8af Mon Sep 17 00:00:00 2001 From: ark Date: Mon, 28 Nov 2022 13:22:57 -0800 Subject: [PATCH] Add valid country tests to workday sensors (#82799) fixes undefined --- tests/components/workday/test_binary_sensor.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/components/workday/test_binary_sensor.py b/tests/components/workday/test_binary_sensor.py index f8ab8794c0d..f0d2d6b0681 100644 --- a/tests/components/workday/test_binary_sensor.py +++ b/tests/components/workday/test_binary_sensor.py @@ -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"):