Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bruxy70 committed Nov 6, 2023
1 parent 53a893f commit a7fff1a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion Holidays.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
{
"path": "."
}
]
],
"settings": {}
}
8 changes: 4 additions & 4 deletions test/test_calendar.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ async def test_cz(hass: HomeAssistant) -> None:

config_entry: MockConfigEntry = MockConfigEntry(
domain=const.DOMAIN,
options={"country": "CZ"},
options={"country": "CZ", "languages": "cs"},
title="CZ Holidays",
)
config_entry.add_to_hass(hass)
Expand All @@ -59,7 +59,7 @@ async def test_cz(hass: HomeAssistant) -> None:
holidays = cz_holidays.attributes["holidays"]
len_holidays = len(holidays)
assert state == "40", ERROR_STATE.format(9, state)
assert next_holiday == "Good Friday", ERROR_NAME.format("Good Friday", next_holiday)
assert next_holiday == "Velký pátek", ERROR_NAME.format("Velký pátek", next_holiday)
assert next_date.date() == date(2020, 4, 10), ERROR_DATE.format(
"April 10", next_date.date()
)
Expand All @@ -71,7 +71,7 @@ async def test_se(hass: HomeAssistant) -> None:

config_entry: MockConfigEntry = MockConfigEntry(
domain=const.DOMAIN,
options={"country": "SE"},
options={"country": "SE", "languages":"sv"},
title="SE Holidays",
)
config_entry.add_to_hass(hass)
Expand All @@ -85,7 +85,7 @@ async def test_se(hass: HomeAssistant) -> None:
holidays = se_holidays.attributes["holidays"]
len_holidays = len(holidays)
assert state == "40", ERROR_STATE.format(9, state)
assert next_holiday == "Good Friday", ERROR_NAME.format("Good Friday", next_holiday)
assert next_holiday == "Långfredagen", ERROR_NAME.format("Långfredagen", next_holiday)
assert next_date.date() == date(2020, 4, 10), ERROR_DATE.format(
"April 10", next_date.date()
)
Expand Down

0 comments on commit a7fff1a

Please sign in to comment.