diff --git a/homeassistant/components/islamic_prayer_times/__init__.py b/homeassistant/components/islamic_prayer_times/__init__.py index d8810b0ad45..64a826ef7bb 100644 --- a/homeassistant/components/islamic_prayer_times/__init__.py +++ b/homeassistant/components/islamic_prayer_times/__init__.py @@ -29,7 +29,7 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> b async def async_unload_entry(hass: HomeAssistant, config_entry: ConfigEntry) -> bool: - """Unload Islamic Prayer entry from config_entry.""" + """Unload Islamic Prayer config entry.""" if unload_ok := await hass.config_entries.async_unload_platforms( config_entry, PLATFORMS ): diff --git a/tests/components/islamic_prayer_times/test_config_flow.py b/tests/components/islamic_prayer_times/test_config_flow.py index 66430938734..d085cb5cd13 100644 --- a/tests/components/islamic_prayer_times/test_config_flow.py +++ b/tests/components/islamic_prayer_times/test_config_flow.py @@ -52,9 +52,17 @@ async def test_options(hass: HomeAssistant) -> None: assert result["type"] == data_entry_flow.FlowResultType.FORM assert result["step_id"] == "init" - result = await hass.config_entries.options.async_configure( - result["flow_id"], user_input={CONF_CALC_METHOD: "makkah"} - ) + with patch( + "prayer_times_calculator.PrayerTimesCalculator.fetch_prayer_times", + return_value=PRAYER_TIMES, + ) as fetch_prayer_times_mock: + result = await hass.config_entries.options.async_configure( + result["flow_id"], user_input={CONF_CALC_METHOD: "makkah"} + ) + await hass.async_block_till_done() + + # Test updating options refreshes data + fetch_prayer_times_mock.assert_called_once() assert result["type"] == data_entry_flow.FlowResultType.CREATE_ENTRY assert result["data"][CONF_CALC_METHOD] == "makkah"