mirror of
https://github.com/home-assistant/core.git
synced 2026-12-05 05:14:01 -04:00
253 lines
9.7 KiB
Python
253 lines
9.7 KiB
Python
"""Compatibility imports for the Home Assistant pytest helpers."""
|
|
|
|
# ruff: noqa: PLC0414
|
|
|
|
from pytest_homeassistant.plugins import (
|
|
_LOGGER as _LOGGER,
|
|
BASE_PLATFORMS as BASE_PLATFORMS,
|
|
CLIENT_ID as CLIENT_ID,
|
|
DATA_SUPERVISOR_USER as DATA_SUPERVISOR_USER,
|
|
GROUP_ID_ADMIN as GROUP_ID_ADMIN,
|
|
GROUP_ID_READ_ONLY as GROUP_ID_READ_ONLY,
|
|
HASSIO_USER_NAME as HASSIO_USER_NAME,
|
|
IGNORE_UNCAUGHT_EXCEPTIONS as IGNORE_UNCAUGHT_EXCEPTIONS,
|
|
INSTANCES as INSTANCES,
|
|
TYPE_AUTH as TYPE_AUTH,
|
|
TYPE_AUTH_OK as TYPE_AUTH_OK,
|
|
TYPE_AUTH_REQUIRED as TYPE_AUTH_REQUIRED,
|
|
TYPE_CHECKING as TYPE_CHECKING,
|
|
URL as URL,
|
|
YAML_CONFIG_FILE as YAML_CONFIG_FILE,
|
|
AiohttpClientMocker as AiohttpClientMocker,
|
|
Any as Any,
|
|
Application as Application,
|
|
AsyncExitStack as AsyncExitStack,
|
|
AsyncGenerator as AsyncGenerator,
|
|
AsyncMock as AsyncMock,
|
|
AsyncResolver as AsyncResolver,
|
|
BaseTestServer as BaseTestServer,
|
|
Callable as Callable,
|
|
ClientSessionGenerator as ClientSessionGenerator,
|
|
CoalescingClient as CoalescingClient,
|
|
CoalescingResponse as CoalescingResponse,
|
|
ConfigEntries as ConfigEntries,
|
|
ConfigEntry as ConfigEntry,
|
|
ConfigEntryState as ConfigEntryState,
|
|
ConfigSubentryData as ConfigSubentryData,
|
|
ConfigType as ConfigType,
|
|
Context as Context,
|
|
CoreState as CoreState,
|
|
Coroutine as Coroutine,
|
|
Credentials as Credentials,
|
|
Device as Device,
|
|
DhcpServiceInfo as DhcpServiceInfo,
|
|
Generator as Generator,
|
|
HASocketBlockedError as HASocketBlockedError,
|
|
HassJob as HassJob,
|
|
HomeAssistant as HomeAssistant,
|
|
HomeAssistantSnapshotExtension as HomeAssistantSnapshotExtension,
|
|
JSONDecoder as JSONDecoder,
|
|
MagicMock as MagicMock,
|
|
Mock as Mock,
|
|
MockConfigEntry as MockConfigEntry,
|
|
MockHAClientWebSocket as MockHAClientWebSocket,
|
|
MockMqttReasonCode as MockMqttReasonCode,
|
|
MockUser as MockUser,
|
|
MqttMockHAClient as MqttMockHAClient,
|
|
MqttMockHAClientGenerator as MqttMockHAClientGenerator,
|
|
MqttMockPahoClient as MqttMockPahoClient,
|
|
RecorderInstanceContextManager as RecorderInstanceContextManager,
|
|
RecorderInstanceGenerator as RecorderInstanceGenerator,
|
|
Self as Self,
|
|
Sequence as Sequence,
|
|
ServiceCall as ServiceCall,
|
|
ServiceNotFound as ServiceNotFound,
|
|
ServiceResponse as ServiceResponse,
|
|
SnapshotAssertion as SnapshotAssertion,
|
|
TestClient as TestClient,
|
|
TestServer as TestServer,
|
|
ThreadSession as ThreadSession,
|
|
WebSocketGenerator as WebSocketGenerator,
|
|
_async_init_recorder_component as _async_init_recorder_component,
|
|
_dhcp_service_info_init as _dhcp_service_info_init,
|
|
_mqtt_mock_entry as _mqtt_mock_entry,
|
|
_patch as _patch,
|
|
_real_dhcp_service_info_init as _real_dhcp_service_info_init,
|
|
_real_getaddrinfo as _real_getaddrinfo,
|
|
_TranslationsCacheData as _TranslationsCacheData,
|
|
aioclient_mock as aioclient_mock,
|
|
aiohttp_client as aiohttp_client,
|
|
aiohttp_client_cls as aiohttp_client_cls,
|
|
ar as ar,
|
|
area_registry as area_registry,
|
|
async_dispatcher_send as async_dispatcher_send,
|
|
async_fire_mqtt_message as async_fire_mqtt_message,
|
|
async_setup_component as async_setup_component,
|
|
async_setup_recorder_instance as async_setup_recorder_instance,
|
|
async_test_home_assistant as async_test_home_assistant,
|
|
async_test_recorder as async_test_recorder,
|
|
asynccontextmanager as asynccontextmanager,
|
|
asyncio as asyncio,
|
|
bcrypt as bcrypt,
|
|
bcrypt_cost as bcrypt_cost,
|
|
bleak_manager as bleak_manager,
|
|
block_async_io as block_async_io,
|
|
block_shared_serial as block_shared_serial,
|
|
caplog_fixture as caplog_fixture,
|
|
cast as cast,
|
|
category_registry as category_registry,
|
|
check_real as check_real,
|
|
client as client,
|
|
components as components,
|
|
config_entry_oauth2_flow as config_entry_oauth2_flow,
|
|
configure_event_loop as configure_event_loop,
|
|
configure_session_event_loop as configure_session_event_loop,
|
|
contextmanager as contextmanager,
|
|
copytree as copytree,
|
|
cr as cr,
|
|
create_eager_task as create_eager_task,
|
|
current_request as current_request,
|
|
current_request_with_host as current_request_with_host,
|
|
deprecation as deprecation,
|
|
device_registry as device_registry,
|
|
disable_block_async_io as disable_block_async_io,
|
|
disable_block_shared_serial as disable_block_shared_serial,
|
|
disable_http_server as disable_http_server,
|
|
disable_mock_zeroconf_resolver as disable_mock_zeroconf_resolver,
|
|
disable_translations_once as disable_translations_once,
|
|
dr as dr,
|
|
dt as dt,
|
|
dt_util as dt_util,
|
|
enable_custom_integrations as enable_custom_integrations,
|
|
enable_event_loop_debug as enable_event_loop_debug,
|
|
enable_migrate_entity_ids as enable_migrate_entity_ids,
|
|
enable_migrate_event_context_ids as enable_migrate_event_context_ids,
|
|
enable_migrate_event_ids as enable_migrate_event_ids,
|
|
enable_migrate_event_type_ids as enable_migrate_event_type_ids,
|
|
enable_migrate_state_context_ids as enable_migrate_state_context_ids,
|
|
enable_missing_statistics as enable_missing_statistics,
|
|
enable_nightly_purge as enable_nightly_purge,
|
|
enable_schema_validation as enable_schema_validation,
|
|
enable_statistics as enable_statistics,
|
|
entity_registry as entity_registry,
|
|
er as er,
|
|
evict_faked_translations as evict_faked_translations,
|
|
execnet as execnet,
|
|
expected_lingering_tasks as expected_lingering_tasks,
|
|
expected_lingering_timers as expected_lingering_timers,
|
|
extract_stack_to_frame as extract_stack_to_frame,
|
|
fail_on_log_exception as fail_on_log_exception,
|
|
floor_registry as floor_registry,
|
|
fr as fr,
|
|
frame as frame,
|
|
freezegun as freezegun,
|
|
functools as functools,
|
|
garbage_collection as garbage_collection,
|
|
gc as gc,
|
|
get_scheduled_timer_handles as get_scheduled_timer_handles,
|
|
get_test_config_dir as get_test_config_dir,
|
|
ha as ha,
|
|
hass as hass,
|
|
hass_access_token as hass_access_token,
|
|
hass_admin_credential as hass_admin_credential,
|
|
hass_admin_user as hass_admin_user,
|
|
hass_client as hass_client,
|
|
hass_client_no_auth as hass_client_no_auth,
|
|
hass_config as hass_config,
|
|
hass_config_dir as hass_config_dir,
|
|
hass_config_yaml as hass_config_yaml,
|
|
hass_config_yaml_files as hass_config_yaml_files,
|
|
hass_fixture_setup as hass_fixture_setup,
|
|
hass_owner_user as hass_owner_user,
|
|
hass_read_only_access_token as hass_read_only_access_token,
|
|
hass_read_only_user as hass_read_only_user,
|
|
hass_storage as hass_storage,
|
|
hass_supervisor_access_token as hass_supervisor_access_token,
|
|
hass_supervisor_user as hass_supervisor_user,
|
|
hass_tmp_config_dir as hass_tmp_config_dir,
|
|
hass_ws_client as hass_ws_client,
|
|
hassio_env as hassio_env,
|
|
hassio_stubs as hassio_stubs,
|
|
homeassistant as homeassistant,
|
|
integration_frame_path as integration_frame_path,
|
|
ipaddress as ipaddress,
|
|
ir as ir,
|
|
issue_registry as issue_registry,
|
|
itertools as itertools,
|
|
json_loads as json_loads,
|
|
label_registry as label_registry,
|
|
load_registries as load_registries,
|
|
loader as loader,
|
|
local_auth as local_auth,
|
|
location_util as location_util,
|
|
logging as logging,
|
|
long_repr_strings as long_repr_strings,
|
|
lr as lr,
|
|
make_mocked_request as make_mocked_request,
|
|
mock_aiohttp_client as mock_aiohttp_client,
|
|
mock_async_zeroconf as mock_async_zeroconf,
|
|
mock_bleak_scanner_start as mock_bleak_scanner_start,
|
|
mock_bluetooth as mock_bluetooth,
|
|
mock_bluetooth_adapters as mock_bluetooth_adapters,
|
|
mock_device_tracker_conf as mock_device_tracker_conf,
|
|
mock_enable_bluetooth as mock_enable_bluetooth,
|
|
mock_get_source_ip as mock_get_source_ip,
|
|
mock_hass_config as mock_hass_config,
|
|
mock_hass_config_yaml as mock_hass_config_yaml,
|
|
mock_integration_frame as mock_integration_frame,
|
|
mock_network as mock_network,
|
|
mock_recorder_before_hass as mock_recorder_before_hass,
|
|
mock_storage as mock_storage,
|
|
mock_zeroconf as mock_zeroconf,
|
|
mock_zeroconf_resolver as mock_zeroconf_resolver,
|
|
mqtt_client_mock as mqtt_client_mock,
|
|
mqtt_config_entry_data as mqtt_config_entry_data,
|
|
mqtt_config_entry_options as mqtt_config_entry_options,
|
|
mqtt_config_subentries_data as mqtt_config_subentries_data,
|
|
mqtt_mock as mqtt_mock,
|
|
mqtt_mock_entry as mqtt_mock_entry,
|
|
multidict as multidict,
|
|
os as os,
|
|
patch as patch,
|
|
patch_json as patch_json,
|
|
patch_recorder as patch_recorder,
|
|
patch_time as patch_time,
|
|
patch_yaml_files as patch_yaml_files,
|
|
pathlib as pathlib,
|
|
persistent_database as persistent_database,
|
|
pytest as pytest,
|
|
pytest_addoption as pytest_addoption,
|
|
pytest_asyncio as pytest_asyncio,
|
|
pytest_configure as pytest_configure,
|
|
pytest_runtest_setup as pytest_runtest_setup,
|
|
pytest_socket as pytest_socket,
|
|
pytest_xdist_setupnodes as pytest_xdist_setupnodes,
|
|
recorder_config as recorder_config,
|
|
recorder_db_url as recorder_db_url,
|
|
recorder_helper as recorder_helper,
|
|
recorder_mock as recorder_mock,
|
|
reprlib as reprlib,
|
|
requests_mock as requests_mock,
|
|
requests_mock_fixture as requests_mock_fixture,
|
|
reset_globals as reset_globals,
|
|
respx as respx,
|
|
rmtree as rmtree,
|
|
runner as runner,
|
|
service_calls as service_calls,
|
|
skip_stop_scripts as skip_stop_scripts,
|
|
snapshot as snapshot,
|
|
socket as socket,
|
|
sqlite3 as sqlite3,
|
|
ssl as ssl,
|
|
stop_hass as stop_hass,
|
|
suppress as suppress,
|
|
sys as sys,
|
|
thread_session as thread_session,
|
|
threading as threading,
|
|
time as time,
|
|
translation_helper as translation_helper,
|
|
translations_once as translations_once,
|
|
verify_cleanup as verify_cleanup,
|
|
wait_for_stop_scripts_after_shutdown as wait_for_stop_scripts_after_shutdown,
|
|
)
|