mirror of
https://github.com/home-assistant/core.git
synced 2026-12-03 04:08:19 -04:00
Remove dead connection check in FRITZ!Box Tools coordinator (#192572)
This commit is contained in:
@@ -221,10 +221,6 @@ class FritzBoxTools(DataUpdateCoordinator[UpdateCoordinatorDataType]):
|
||||
redact_debug_log=True,
|
||||
)
|
||||
|
||||
if not self.connection:
|
||||
LOGGER.error("Unable to establish a connection with %s", self.host)
|
||||
return
|
||||
|
||||
LOGGER.debug(
|
||||
"detected services on %s %s",
|
||||
self.host,
|
||||
|
||||
@@ -156,31 +156,6 @@ async def test_clear_connection_cache(
|
||||
assert "Cleared FritzConnection call action cache" in caplog.text
|
||||
|
||||
|
||||
async def test_no_connection(
|
||||
hass: HomeAssistant,
|
||||
caplog: pytest.LogCaptureFixture,
|
||||
fc_class_mock,
|
||||
fh_class_mock,
|
||||
fs_class_mock,
|
||||
) -> None:
|
||||
"""Test no connection established."""
|
||||
|
||||
entry = MockConfigEntry(domain=DOMAIN, data=MOCK_USER_DATA)
|
||||
entry.add_to_hass(hass)
|
||||
|
||||
with patch(
|
||||
"homeassistant.components.fritz.coordinator.FritzConnectionCached",
|
||||
return_value=None,
|
||||
):
|
||||
await hass.config_entries.async_setup(entry.entry_id)
|
||||
await hass.async_block_till_done(wait_background_tasks=True)
|
||||
|
||||
assert (
|
||||
f"Unable to establish a connection with {MOCK_USER_DATA[CONF_HOST]}"
|
||||
in caplog.text
|
||||
)
|
||||
|
||||
|
||||
async def test_no_software_version(
|
||||
hass: HomeAssistant,
|
||||
device_registry: dr.DeviceRegistry,
|
||||
|
||||
Reference in New Issue
Block a user