Import recorder locally in test fixtures (#86286)

This commit is contained in:
Erik Montnemery 2023-01-20 14:22:48 +01:00 committed by GitHub
parent 24fdd588fd
commit d94f007dbf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -71,9 +71,6 @@ from tests.common import ( # noqa: E402, isort:skip
mock_storage as mock_storage, mock_storage as mock_storage,
) )
from tests.test_util.aiohttp import mock_aiohttp_client # noqa: E402, isort:skip from tests.test_util.aiohttp import mock_aiohttp_client # noqa: E402, isort:skip
from tests.components.recorder.common import ( # noqa: E402, isort:skip
async_recorder_block_till_done,
)
_LOGGER = logging.getLogger(__name__) _LOGGER = logging.getLogger(__name__)
@ -1058,6 +1055,8 @@ async def async_setup_recorder_instance(
# testcase which does not use the recorder. # testcase which does not use the recorder.
from homeassistant.components import recorder from homeassistant.components import recorder
from tests.components.recorder.common import async_recorder_block_till_done
nightly = recorder.Recorder.async_nightly_tasks if enable_nightly_purge else None nightly = recorder.Recorder.async_nightly_tasks if enable_nightly_purge else None
stats = recorder.Recorder.async_periodic_statistics if enable_statistics else None stats = recorder.Recorder.async_periodic_statistics if enable_statistics else None
stats_validate = ( stats_validate = (