From a23f70bba9f3459a16f2e3f86b342d65560ee231 Mon Sep 17 00:00:00 2001 From: Markus Tuominen <3738613+Markus98@users.noreply.github.com> Date: Thu, 24 Sep 2026 14:37:28 +0300 Subject: [PATCH] Wait for background tasks in Pterodactyl binary sensor tests (#183044) --- tests/components/pterodactyl/test_binary_sensor.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/components/pterodactyl/test_binary_sensor.py b/tests/components/pterodactyl/test_binary_sensor.py index 19e0d480e015..da1a875c9064 100644 --- a/tests/components/pterodactyl/test_binary_sensor.py +++ b/tests/components/pterodactyl/test_binary_sensor.py @@ -54,7 +54,7 @@ async def test_binary_sensor_update( freezer.tick(timedelta(seconds=90)) async_fire_time_changed(hass) - await hass.async_block_till_done() + await hass.async_block_till_done(wait_background_tasks=True) assert len(hass.states.async_all(Platform.BINARY_SENSOR)) == 4 assert ( @@ -154,7 +154,7 @@ async def test_binary_sensor_suspended_server_transition_runtime( server_data["1"] = server_1_data_suspended freezer.tick(timedelta(seconds=90)) async_fire_time_changed(hass) - await hass.async_block_till_done() + await hass.async_block_till_done(wait_background_tasks=True) assert ( hass.states.get(f"{Platform.BINARY_SENSOR}.test_server_1_status").state == "off" @@ -169,7 +169,7 @@ async def test_binary_sensor_suspended_server_transition_runtime( server_data["1"] = server_1_data freezer.tick(timedelta(seconds=90)) async_fire_time_changed(hass) - await hass.async_block_till_done() + await hass.async_block_till_done(wait_background_tasks=True) assert ( hass.states.get(f"{Platform.BINARY_SENSOR}.test_server_1_status").state