run history tests on schema 30 as well

This commit is contained in:
J. Nick Koston
2023-04-10 21:34:32 -10:00
parent 66c5cfbf77
commit d798b100ac
3 changed files with 22 additions and 1060 deletions

View File

@@ -23,11 +23,22 @@ from tests.components.recorder.common import (
assert_multiple_states_equal_without_context_and_last_changed, assert_multiple_states_equal_without_context_and_last_changed,
assert_states_equal_without_context, assert_states_equal_without_context,
async_wait_recording_done, async_wait_recording_done,
old_db_schema,
wait_recording_done, wait_recording_done,
) )
from tests.typing import ClientSessionGenerator from tests.typing import ClientSessionGenerator
@pytest.fixture(autouse=True, params=["30", None])
def init_schema(request):
"""Fixture to initialize the db with the old schema."""
if request.param:
with old_db_schema(request.param):
yield
else:
yield
def listeners_without_writes(listeners: dict[str, int]) -> dict[str, int]: def listeners_without_writes(listeners: dict[str, int]) -> dict[str, int]:
"""Return listeners without final write listeners since we are not testing for these.""" """Return listeners without final write listeners since we are not testing for these."""
return { return {

File diff suppressed because it is too large Load Diff

View File

@@ -24,10 +24,21 @@ from tests.common import async_fire_time_changed
from tests.components.recorder.common import ( from tests.components.recorder.common import (
async_recorder_block_till_done, async_recorder_block_till_done,
async_wait_recording_done, async_wait_recording_done,
old_db_schema,
) )
from tests.typing import WebSocketGenerator from tests.typing import WebSocketGenerator
@pytest.fixture(autouse=True, params=["30", None])
def init_schema(request):
"""Fixture to initialize the db with the old schema."""
if request.param:
with old_db_schema(request.param):
yield
else:
yield
def listeners_without_writes(listeners: dict[str, int]) -> dict[str, int]: def listeners_without_writes(listeners: dict[str, int]) -> dict[str, int]:
"""Return listeners without final write listeners since we are not testing for these.""" """Return listeners without final write listeners since we are not testing for these."""
return { return {