Sonos reduce test time (#111688)

This commit is contained in:
Pete Sage 2024-03-12 16:14:27 -04:00 committed by GitHub
parent 848012871f
commit 46ce438b6d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -369,7 +369,7 @@ async def test_async_poll_manual_hosts_6(
"homeassistant.components.sonos.DISCOVERY_INTERVAL"
) as mock_discovery_interval:
# Speed up manual discovery interval so second iteration runs sooner
mock_discovery_interval.total_seconds = Mock(side_effect=[0.5, 60])
mock_discovery_interval.total_seconds = Mock(side_effect=[0.0, 60])
await _setup_hass(hass)
assert "media_player.bedroom" in entity_registry.entities
@ -377,10 +377,6 @@ async def test_async_poll_manual_hosts_6(
with caplog.at_level(logging.DEBUG):
caplog.clear()
# The discovery events should not fire, wait with a timeout.
with pytest.raises(TimeoutError):
async with asyncio.timeout(1.0):
await speaker_1_activity.event.wait()
await hass.async_block_till_done()
assert "Activity on Living Room" not in caplog.text
assert "Activity on Bedroom" not in caplog.text