mirror of
https://github.com/home-assistant/core.git
synced 2025-11-08 18:39:30 +00:00
Fix history using pre v25 queries during v26 migration (#71295)
This commit is contained in:
@@ -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."""
|
||||
|
||||
Reference in New Issue
Block a user