Fix sonos switch test failures (#115052)

pull/115063/head
Pete Sage 2024-04-06 18:51:21 -04:00 committed by GitHub
parent 6f783d75bc
commit 553c147933
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 0 deletions

View File

@ -8,6 +8,7 @@ from unittest.mock import AsyncMock, MagicMock, Mock, patch
import pytest
from soco import SoCo
from soco.alarms import Alarms
from soco.events_base import Event as SonosEvent
from homeassistant.components import ssdp, zeroconf
@ -122,6 +123,8 @@ def async_setup_sonos(hass, config_entry, fire_zgs_event):
async def _wrapper():
config_entry.add_to_hass(hass)
sonos_alarms = Alarms()
sonos_alarms.last_alarm_list_version = "RINCON_test:0"
assert await hass.config_entries.async_setup(config_entry.entry_id)
await hass.async_block_till_done(wait_background_tasks=True)
await fire_zgs_event()