mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Fix google assistant cloud sync test (#113044)
This commit is contained in:
parent
17aa49410b
commit
fd8ee6c857
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user