From fd8ee6c85760961d67fa7ee6b39886fe6c17babd Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sun, 10 Mar 2024 22:44:21 -1000 Subject: [PATCH] Fix google assistant cloud sync test (#113044) --- tests/components/cloud/test_google_config.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/components/cloud/test_google_config.py b/tests/components/cloud/test_google_config.py index dfadf80a601..f10a3cdbac5 100644 --- a/tests/components/cloud/test_google_config.py +++ b/tests/components/cloud/test_google_config.py @@ -341,12 +341,13 @@ async def test_sync_google_on_home_assistant_start( config = CloudGoogleConfig( hass, GACTIONS_SCHEMA({}), "mock-user-id", cloud_prefs, hass.data["cloud"] ) - hass.set_state(CoreState.starting) + hass.set_state(CoreState.not_running) with patch.object(config, "async_sync_entities_all") as mock_sync: await config.async_initialize() + await hass.async_block_till_done() assert len(mock_sync.mock_calls) == 0 - hass.bus.async_fire(EVENT_HOMEASSISTANT_STARTED) + hass.bus.async_fire(EVENT_HOMEASSISTANT_START) await hass.async_block_till_done() assert len(mock_sync.mock_calls) == 1