Use recorder_mock in tests (#70363)
Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
This commit is contained in:
parent
16ca038f12
commit
982e314de6
43 changed files with 220 additions and 366 deletions
|
@ -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 {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue