mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Don't mock out migration in recorder tests (#80480)
This commit is contained in:
parent
a8f1cc0d33
commit
416aad32cc
@ -933,9 +933,7 @@ def init_recorder_component(hass, add_config=None):
|
|||||||
if recorder.CONF_COMMIT_INTERVAL not in config:
|
if recorder.CONF_COMMIT_INTERVAL not in config:
|
||||||
config[recorder.CONF_COMMIT_INTERVAL] = 0
|
config[recorder.CONF_COMMIT_INTERVAL] = 0
|
||||||
|
|
||||||
with patch("homeassistant.components.recorder.ALLOW_IN_MEMORY_DB", True), patch(
|
with patch("homeassistant.components.recorder.ALLOW_IN_MEMORY_DB", True):
|
||||||
"homeassistant.components.recorder.migration.migrate_schema"
|
|
||||||
):
|
|
||||||
if recorder.DOMAIN not in hass.data:
|
if recorder.DOMAIN not in hass.data:
|
||||||
recorder_helper.async_initialize_recorder(hass)
|
recorder_helper.async_initialize_recorder(hass)
|
||||||
assert setup_component(hass, recorder.DOMAIN, {recorder.DOMAIN: config})
|
assert setup_component(hass, recorder.DOMAIN, {recorder.DOMAIN: config})
|
||||||
|
@ -897,9 +897,7 @@ async def _async_init_recorder_component(hass, add_config=None):
|
|||||||
if recorder.CONF_COMMIT_INTERVAL not in config:
|
if recorder.CONF_COMMIT_INTERVAL not in config:
|
||||||
config[recorder.CONF_COMMIT_INTERVAL] = 0
|
config[recorder.CONF_COMMIT_INTERVAL] = 0
|
||||||
|
|
||||||
with patch("homeassistant.components.recorder.ALLOW_IN_MEMORY_DB", True), patch(
|
with patch("homeassistant.components.recorder.ALLOW_IN_MEMORY_DB", True):
|
||||||
"homeassistant.components.recorder.migration.migrate_schema"
|
|
||||||
):
|
|
||||||
if recorder.DOMAIN not in hass.data:
|
if recorder.DOMAIN not in hass.data:
|
||||||
recorder_helper.async_initialize_recorder(hass)
|
recorder_helper.async_initialize_recorder(hass)
|
||||||
assert await async_setup_component(
|
assert await async_setup_component(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user