J. Nick Koston 2024-05-10 20:24:49 -05:00 committed by GitHub
parent 2e60e09ba2
commit 3ad489d835
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -213,6 +213,8 @@ async def test_async_poll_manual_hosts_1(
not in caplog.text not in caplog.text
) )
await hass.async_block_till_done(wait_background_tasks=True)
async def test_async_poll_manual_hosts_2( async def test_async_poll_manual_hosts_2(
hass: HomeAssistant, hass: HomeAssistant,
@ -237,6 +239,8 @@ async def test_async_poll_manual_hosts_2(
in caplog.text in caplog.text
) )
await hass.async_block_till_done(wait_background_tasks=True)
async def test_async_poll_manual_hosts_3( async def test_async_poll_manual_hosts_3(
hass: HomeAssistant, hass: HomeAssistant,
@ -261,6 +265,8 @@ async def test_async_poll_manual_hosts_3(
in caplog.text in caplog.text
) )
await hass.async_block_till_done(wait_background_tasks=True)
async def test_async_poll_manual_hosts_4( async def test_async_poll_manual_hosts_4(
hass: HomeAssistant, hass: HomeAssistant,
@ -285,6 +291,8 @@ async def test_async_poll_manual_hosts_4(
not in caplog.text not in caplog.text
) )
await hass.async_block_till_done(wait_background_tasks=True)
class SpeakerActivity: class SpeakerActivity:
"""Unit test class to track speaker activity messages.""" """Unit test class to track speaker activity messages."""
@ -348,6 +356,8 @@ async def test_async_poll_manual_hosts_5(
assert "Activity on Living Room" in caplog.text assert "Activity on Living Room" in caplog.text
assert "Activity on Bedroom" in caplog.text assert "Activity on Bedroom" in caplog.text
await hass.async_block_till_done(wait_background_tasks=True)
async def test_async_poll_manual_hosts_6( async def test_async_poll_manual_hosts_6(
hass: HomeAssistant, hass: HomeAssistant,
@ -386,6 +396,8 @@ async def test_async_poll_manual_hosts_6(
assert speaker_1_activity.call_count == 0 assert speaker_1_activity.call_count == 0
assert speaker_2_activity.call_count == 0 assert speaker_2_activity.call_count == 0
await hass.async_block_till_done(wait_background_tasks=True)
async def test_async_poll_manual_hosts_7( async def test_async_poll_manual_hosts_7(
hass: HomeAssistant, hass: HomeAssistant,
@ -413,6 +425,8 @@ async def test_async_poll_manual_hosts_7(
assert "media_player.garage" in entity_registry.entities assert "media_player.garage" in entity_registry.entities
assert "media_player.studio" in entity_registry.entities assert "media_player.studio" in entity_registry.entities
await hass.async_block_till_done(wait_background_tasks=True)
async def test_async_poll_manual_hosts_8( async def test_async_poll_manual_hosts_8(
hass: HomeAssistant, hass: HomeAssistant,
@ -439,3 +453,4 @@ async def test_async_poll_manual_hosts_8(
assert "media_player.basement" in entity_registry.entities assert "media_player.basement" in entity_registry.entities
assert "media_player.garage" in entity_registry.entities assert "media_player.garage" in entity_registry.entities
assert "media_player.studio" in entity_registry.entities assert "media_player.studio" in entity_registry.entities
await hass.async_block_till_done(wait_background_tasks=True)