Fix CoreState in cloud google assistant tests (#113045)

This commit is contained in:
J. Nick Koston 2024-03-10 22:50:09 -10:00 committed by GitHub
parent fd8ee6c857
commit 30c3174498
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -510,7 +510,7 @@ async def test_google_config_migrate_expose_entity_prefs(
google_settings_version: int, google_settings_version: int,
) -> None: ) -> None:
"""Test migrating Google entity config.""" """Test migrating Google entity config."""
hass.set_state(CoreState.starting) hass.set_state(CoreState.not_running)
assert await async_setup_component(hass, "homeassistant", {}) assert await async_setup_component(hass, "homeassistant", {})
hass.states.async_set("light.state_only", "on") hass.states.async_set("light.state_only", "on")
@ -623,7 +623,7 @@ async def test_google_config_migrate_expose_entity_prefs_v2_no_exposed(
entity_registry: er.EntityRegistry, entity_registry: er.EntityRegistry,
) -> None: ) -> None:
"""Test migrating Google entity config from v2 to v3 when no entity is exposed.""" """Test migrating Google entity config from v2 to v3 when no entity is exposed."""
hass.set_state(CoreState.starting) hass.set_state(CoreState.not_running)
assert await async_setup_component(hass, "homeassistant", {}) assert await async_setup_component(hass, "homeassistant", {})
hass.states.async_set("light.state_only", "on") hass.states.async_set("light.state_only", "on")
@ -670,7 +670,7 @@ async def test_google_config_migrate_expose_entity_prefs_v2_exposed(
entity_registry: er.EntityRegistry, entity_registry: er.EntityRegistry,
) -> None: ) -> None:
"""Test migrating Google entity config from v2 to v3 when an entity is exposed.""" """Test migrating Google entity config from v2 to v3 when an entity is exposed."""
hass.set_state(CoreState.starting) hass.set_state(CoreState.not_running)
assert await async_setup_component(hass, "homeassistant", {}) assert await async_setup_component(hass, "homeassistant", {})
hass.states.async_set("light.state_only", "on") hass.states.async_set("light.state_only", "on")
@ -717,7 +717,7 @@ async def test_google_config_migrate_expose_entity_prefs_default_none(
entity_registry: er.EntityRegistry, entity_registry: er.EntityRegistry,
) -> None: ) -> None:
"""Test migrating Google entity config.""" """Test migrating Google entity config."""
hass.set_state(CoreState.starting) hass.set_state(CoreState.not_running)
assert await async_setup_component(hass, "homeassistant", {}) assert await async_setup_component(hass, "homeassistant", {})
entity_default = entity_registry.async_get_or_create( entity_default = entity_registry.async_get_or_create(
@ -754,7 +754,7 @@ async def test_google_config_migrate_expose_entity_prefs_default(
entity_registry: er.EntityRegistry, entity_registry: er.EntityRegistry,
) -> None: ) -> None:
"""Test migrating Google entity config.""" """Test migrating Google entity config."""
hass.set_state(CoreState.starting) hass.set_state(CoreState.not_running)
assert await async_setup_component(hass, "homeassistant", {}) assert await async_setup_component(hass, "homeassistant", {})