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:
Erik Montnemery 2024-07-25 21:18:55 +02:00 committed by GitHub
parent 32a0463f47
commit 5dbd7684ce
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 139 additions and 49 deletions

View file

@ -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://"