From c191daedc3e72a4ae84829ff9a0e84de6ceb3e55 Mon Sep 17 00:00:00 2001 From: Guido Schmitz Date: Fri, 13 Jan 2023 21:15:50 +0100 Subject: [PATCH] Remove dead code path in devolo Home Network (#85790) Remove dead code path --- .../devolo_home_network/__init__.py | 2 -- .../devolo_home_network/test_switch.py | 25 ------------------- 2 files changed, 27 deletions(-) diff --git a/homeassistant/components/devolo_home_network/__init__.py b/homeassistant/components/devolo_home_network/__init__.py index f53dfeafe48..5fdb75bb5f9 100644 --- a/homeassistant/components/devolo_home_network/__init__.py +++ b/homeassistant/components/devolo_home_network/__init__.py @@ -88,8 +88,6 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: return await device.device.async_get_led_setting() except DeviceUnavailable as err: raise UpdateFailed(err) from err - except DevicePasswordProtected as err: - raise ConfigEntryAuthFailed(err) from err async def async_update_wifi_connected_station() -> list[ConnectedStationInfo]: """Fetch data from API endpoint.""" diff --git a/tests/components/devolo_home_network/test_switch.py b/tests/components/devolo_home_network/test_switch.py index a7853ad4b55..47924f4aa85 100644 --- a/tests/components/devolo_home_network/test_switch.py +++ b/tests/components/devolo_home_network/test_switch.py @@ -70,31 +70,6 @@ async def test_update_guest_wifi_status_auth_failed( await hass.config_entries.async_unload(entry.entry_id) -async def test_update_led_status_auth_failed( - hass: HomeAssistant, mock_device: MockDevice -): - """Test getting the led status with wrong password triggers the reauth flow.""" - entry = configure_integration(hass) - mock_device.device.async_get_led_setting.side_effect = DevicePasswordProtected - - await hass.config_entries.async_setup(entry.entry_id) - await hass.async_block_till_done() - assert entry.state is ConfigEntryState.SETUP_ERROR - - flows = hass.config_entries.flow.async_progress() - assert len(flows) == 1 - - flow = flows[0] - assert flow["step_id"] == "reauth_confirm" - assert flow["handler"] == DOMAIN - - assert "context" in flow - assert flow["context"]["source"] == SOURCE_REAUTH - assert flow["context"]["entry_id"] == entry.entry_id - - await hass.config_entries.async_unload(entry.entry_id) - - async def test_update_enable_guest_wifi(hass: HomeAssistant, mock_device: MockDevice): """Test state change of a enable_guest_wifi switch device.""" entry = configure_integration(hass)