mirror of
https://github.com/home-assistant/core.git
synced 2025-08-02 12:15:08 +02:00
run history tests on schema 30 as well
This commit is contained in:
@@ -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
@@ -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 {
|
||||||
|
Reference in New Issue
Block a user