Fix history using pre v25 queries during v26 migration (#71295)

This commit is contained in:
J. Nick Koston
2022-05-04 10:56:50 -05:00
committed by GitHub
parent 08770d015b
commit 13ce0a7d6a
5 changed files with 23 additions and 6 deletions

View File

@@ -26,6 +26,7 @@ from homeassistant.components.recorder import (
)
from homeassistant.components.recorder.const import DATA_INSTANCE, KEEPALIVE_TIME
from homeassistant.components.recorder.models import (
SCHEMA_VERSION,
EventData,
Events,
RecorderRuns,
@@ -459,6 +460,12 @@ def _state_with_context(hass, entity_id):
return hass.states.get(entity_id)
def test_setup_without_migration(hass_recorder):
"""Verify the schema version without a migration."""
hass = hass_recorder()
assert recorder.get_instance(hass).schema_version == SCHEMA_VERSION
# pylint: disable=redefined-outer-name,invalid-name
def test_saving_state_include_domains(hass_recorder):
"""Test saving and restoring a state."""