Fail tests if recorder creates nested sessions (#122579)
* Fail tests if recorder creates nested sessions * Adjust import order * Move get_instance
This commit is contained in:
parent
32a0463f47
commit
5dbd7684ce
6 changed files with 139 additions and 49 deletions
|
@ -13,15 +13,11 @@ from homeassistant.const import (
|
|||
EVENT_RECORDER_HOURLY_STATISTICS_GENERATED, # noqa: F401
|
||||
)
|
||||
from homeassistant.helpers.json import JSON_DUMP # noqa: F401
|
||||
from homeassistant.util.hass_dict import HassKey
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from .core import Recorder # noqa: F401
|
||||
|
||||
|
||||
DATA_INSTANCE: HassKey[Recorder] = HassKey("recorder_instance")
|
||||
|
||||
|
||||
SQLITE_URL_PREFIX = "sqlite://"
|
||||
MARIADB_URL_PREFIX = "mariadb://"
|
||||
MARIADB_PYMYSQL_URL_PREFIX = "mariadb+pymysql://"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue