From 624837912c56b4b6d28b25bca70182b935c2305e Mon Sep 17 00:00:00 2001 From: Jan Bouwhuis Date: Tue, 7 Nov 2023 22:11:02 +0100 Subject: [PATCH] Fix metoffice test_forecast_subscription raises key error (#103598) Allow test time change to be processed --- tests/components/metoffice/test_weather.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/components/metoffice/test_weather.py b/tests/components/metoffice/test_weather.py index 6c6041b1869..8930d318ec7 100644 --- a/tests/components/metoffice/test_weather.py +++ b/tests/components/metoffice/test_weather.py @@ -559,6 +559,7 @@ async def test_forecast_subscription( assert forecast1 == snapshot freezer.tick(DEFAULT_SCAN_INTERVAL + timedelta(seconds=1)) + async_fire_time_changed(hass) await hass.async_block_till_done() msg = await client.receive_json() @@ -575,5 +576,8 @@ async def test_forecast_subscription( "subscription": subscription_id, } ) + freezer.tick(timedelta(seconds=1)) + async_fire_time_changed(hass) + await hass.async_block_till_done() msg = await client.receive_json() assert msg["success"]