mirror of
https://github.com/home-assistant/core.git
synced 2025-12-25 05:26:47 +00:00
Use recorder_mock in tests (#70363)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
This commit is contained in:
@@ -3,7 +3,7 @@ from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
from collections import OrderedDict
|
||||
from collections.abc import Awaitable, Collection
|
||||
from collections.abc import Awaitable, Callable, Collection
|
||||
from contextlib import contextmanager
|
||||
from datetime import datetime, timedelta
|
||||
import functools as ft
|
||||
@@ -896,6 +896,9 @@ def assert_setup_component(count, domain=None):
|
||||
), f"setup_component failed, expected {count} got {res_len}: {res}"
|
||||
|
||||
|
||||
SetupRecorderInstanceT = Callable[..., Awaitable[recorder.Recorder]]
|
||||
|
||||
|
||||
def init_recorder_component(hass, add_config=None):
|
||||
"""Initialize the recorder."""
|
||||
config = dict(add_config) if add_config else {}
|
||||
|
||||
Reference in New Issue
Block a user