Fix flaky abode test_add_unique_id teardown (#187053)

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Paulus Schoutsen
2026-10-17 21:41:24 +02:00
committed by GitHub
co-authored by Claude
parent c517d079e1
commit b7a099a1f2
+4 -2
View File
@@ -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]