From b7a099a1f282cdcbbfefe8332d6de39de73aacee Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Sat, 17 Oct 2026 15:41:24 -0400 Subject: [PATCH] Fix flaky abode test_add_unique_id teardown (#187053) Co-authored-by: Claude --- tests/components/abode/test_init.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/components/abode/test_init.py b/tests/components/abode/test_init.py index 51c1c40d8b37..05c5145d88be 100644 --- a/tests/components/abode/test_init.py +++ b/tests/components/abode/test_init.py @@ -65,8 +65,10 @@ async def test_add_unique_id(hass: HomeAssistant) -> None: assert mock_entry.unique_id is None - await hass.config_entries.async_reload(mock_entry.entry_id) - await hass.async_block_till_done() + # The reload creates a new client, which would otherwise open a real socket + with patch("jaraco.abode.event_controller.sio"): + await hass.config_entries.async_reload(mock_entry.entry_id) + await hass.async_block_till_done() assert mock_entry.unique_id == mock_entry.data[CONF_USERNAME]