Use relative imports in tests [a-i] (#119280)
This commit is contained in:
parent
e818de1da8
commit
b8e57f6174
35 changed files with 67 additions and 38 deletions
|
@ -8,8 +8,9 @@ from homeassistant.components.airgradient import DOMAIN
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.helpers import device_registry as dr
|
from homeassistant.helpers import device_registry as dr
|
||||||
|
|
||||||
|
from . import setup_integration
|
||||||
|
|
||||||
from tests.common import MockConfigEntry
|
from tests.common import MockConfigEntry
|
||||||
from tests.components.airgradient import setup_integration
|
|
||||||
|
|
||||||
|
|
||||||
async def test_device_info(
|
async def test_device_info(
|
||||||
|
|
|
@ -7,7 +7,7 @@ from homeassistant.const import Platform
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.helpers import device_registry as dr, entity_registry as er
|
from homeassistant.helpers import device_registry as dr, entity_registry as er
|
||||||
|
|
||||||
from tests.components.airthings_ble import (
|
from . import (
|
||||||
CO2_V1,
|
CO2_V1,
|
||||||
CO2_V2,
|
CO2_V2,
|
||||||
HUMIDITY_V2,
|
HUMIDITY_V2,
|
||||||
|
@ -21,6 +21,7 @@ from tests.components.airthings_ble import (
|
||||||
create_entry,
|
create_entry,
|
||||||
patch_airthings_device_update,
|
patch_airthings_device_update,
|
||||||
)
|
)
|
||||||
|
|
||||||
from tests.components.bluetooth import inject_bluetooth_service_info
|
from tests.components.bluetooth import inject_bluetooth_service_info
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
|
@ -24,13 +24,14 @@ from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.helpers import device_registry as dr, entity_registry as er
|
from homeassistant.helpers import device_registry as dr, entity_registry as er
|
||||||
from homeassistant.setup import async_setup_component
|
from homeassistant.setup import async_setup_component
|
||||||
|
|
||||||
|
from .common import MockAlarm
|
||||||
|
|
||||||
from tests.common import (
|
from tests.common import (
|
||||||
MockConfigEntry,
|
MockConfigEntry,
|
||||||
async_get_device_automation_capabilities,
|
async_get_device_automation_capabilities,
|
||||||
async_get_device_automations,
|
async_get_device_automations,
|
||||||
setup_test_component_platform,
|
setup_test_component_platform,
|
||||||
)
|
)
|
||||||
from tests.components.alarm_control_panel.common import MockAlarm
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
|
|
@ -15,8 +15,9 @@ from homeassistant.config_entries import SOURCE_USER
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.data_entry_flow import FlowResultType
|
from homeassistant.data_entry_flow import FlowResultType
|
||||||
|
|
||||||
|
from . import setup_integration
|
||||||
|
|
||||||
from tests.common import MockConfigEntry
|
from tests.common import MockConfigEntry
|
||||||
from tests.components.analytics_insights import setup_integration
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
|
|
|
@ -8,8 +8,9 @@ from homeassistant.components.analytics_insights.const import DOMAIN
|
||||||
from homeassistant.config_entries import ConfigEntryState
|
from homeassistant.config_entries import ConfigEntryState
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
|
|
||||||
|
from . import setup_integration
|
||||||
|
|
||||||
from tests.common import MockConfigEntry
|
from tests.common import MockConfigEntry
|
||||||
from tests.components.analytics_insights import setup_integration
|
|
||||||
|
|
||||||
|
|
||||||
async def test_load_unload_entry(
|
async def test_load_unload_entry(
|
||||||
|
|
|
@ -18,8 +18,9 @@ from homeassistant.const import CONF_EMAIL, CONF_PASSWORD
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.data_entry_flow import FlowResultType
|
from homeassistant.data_entry_flow import FlowResultType
|
||||||
|
|
||||||
|
from .conftest import FIXTURE_USER_INPUT
|
||||||
|
|
||||||
from tests.common import MockConfigEntry, async_fire_time_changed
|
from tests.common import MockConfigEntry, async_fire_time_changed
|
||||||
from tests.components.aosmith.conftest import FIXTURE_USER_INPUT
|
|
||||||
|
|
||||||
|
|
||||||
async def test_form(hass: HomeAssistant, mock_setup_entry: AsyncMock) -> None:
|
async def test_form(hass: HomeAssistant, mock_setup_entry: AsyncMock) -> None:
|
||||||
|
|
|
@ -4,7 +4,8 @@ from syrupy.assertion import SnapshotAssertion
|
||||||
|
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
|
|
||||||
from tests.components.apcupsd import async_init_integration
|
from . import async_init_integration
|
||||||
|
|
||||||
from tests.components.diagnostics import get_diagnostics_for_config_entry
|
from tests.components.diagnostics import get_diagnostics_for_config_entry
|
||||||
from tests.typing import ClientSessionGenerator
|
from tests.typing import ClientSessionGenerator
|
||||||
|
|
||||||
|
|
|
@ -13,8 +13,9 @@ from homeassistant.components.aquacell.const import (
|
||||||
)
|
)
|
||||||
from homeassistant.const import CONF_EMAIL
|
from homeassistant.const import CONF_EMAIL
|
||||||
|
|
||||||
|
from . import TEST_CONFIG_ENTRY
|
||||||
|
|
||||||
from tests.common import MockConfigEntry, load_json_array_fixture
|
from tests.common import MockConfigEntry, load_json_array_fixture
|
||||||
from tests.components.aquacell import TEST_CONFIG_ENTRY
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
|
|
@ -11,8 +11,9 @@ from homeassistant.const import CONF_EMAIL, CONF_PASSWORD
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.data_entry_flow import FlowResultType
|
from homeassistant.data_entry_flow import FlowResultType
|
||||||
|
|
||||||
|
from . import TEST_CONFIG_ENTRY, TEST_USER_INPUT
|
||||||
|
|
||||||
from tests.common import MockConfigEntry
|
from tests.common import MockConfigEntry
|
||||||
from tests.components.aquacell import TEST_CONFIG_ENTRY, TEST_USER_INPUT
|
|
||||||
|
|
||||||
|
|
||||||
async def test_config_flow_already_configured(hass: HomeAssistant) -> None:
|
async def test_config_flow_already_configured(hass: HomeAssistant) -> None:
|
||||||
|
|
|
@ -16,8 +16,9 @@ from homeassistant.components.aquacell.const import (
|
||||||
from homeassistant.config_entries import ConfigEntryState
|
from homeassistant.config_entries import ConfigEntryState
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
|
|
||||||
|
from . import setup_integration
|
||||||
|
|
||||||
from tests.common import MockConfigEntry
|
from tests.common import MockConfigEntry
|
||||||
from tests.components.aquacell import setup_integration
|
|
||||||
|
|
||||||
|
|
||||||
async def test_load_unload_entry(
|
async def test_load_unload_entry(
|
||||||
|
|
|
@ -9,8 +9,9 @@ from syrupy import SnapshotAssertion
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.helpers import entity_registry as er
|
from homeassistant.helpers import entity_registry as er
|
||||||
|
|
||||||
|
from . import setup_integration
|
||||||
|
|
||||||
from tests.common import MockConfigEntry, snapshot_platform
|
from tests.common import MockConfigEntry, snapshot_platform
|
||||||
from tests.components.aquacell import setup_integration
|
|
||||||
|
|
||||||
|
|
||||||
async def test_sensors(
|
async def test_sensors(
|
||||||
|
|
|
@ -11,8 +11,9 @@ from homeassistant.const import CONF_LATITUDE, CONF_LONGITUDE
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.data_entry_flow import FlowResultType
|
from homeassistant.data_entry_flow import FlowResultType
|
||||||
|
|
||||||
|
from . import setup_integration
|
||||||
|
|
||||||
from tests.common import MockConfigEntry
|
from tests.common import MockConfigEntry
|
||||||
from tests.components.aurora import setup_integration
|
|
||||||
|
|
||||||
DATA = {
|
DATA = {
|
||||||
CONF_LATITUDE: -10,
|
CONF_LATITUDE: -10,
|
||||||
|
|
|
@ -7,7 +7,7 @@ from syrupy.assertion import SnapshotAssertion
|
||||||
|
|
||||||
from homeassistant.components.bmw_connected_drive import DOMAIN as BMW_DOMAIN
|
from homeassistant.components.bmw_connected_drive import DOMAIN as BMW_DOMAIN
|
||||||
from homeassistant.components.bmw_connected_drive.sensor import SENSOR_TYPES
|
from homeassistant.components.bmw_connected_drive.sensor import SENSOR_TYPES
|
||||||
from homeassistant.components.sensor.const import SensorDeviceClass
|
from homeassistant.components.sensor import SensorDeviceClass
|
||||||
from homeassistant.const import Platform
|
from homeassistant.const import Platform
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.helpers import entity_registry as er
|
from homeassistant.helpers import entity_registry as er
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
"""Test BTHome BLE events."""
|
"""Test BTHome BLE events."""
|
||||||
|
|
||||||
from homeassistant.components import automation
|
from homeassistant.components import automation
|
||||||
from homeassistant.components.bluetooth.const import DOMAIN as BLUETOOTH_DOMAIN
|
from homeassistant.components.bluetooth import DOMAIN as BLUETOOTH_DOMAIN
|
||||||
from homeassistant.components.bthome.const import CONF_SUBTYPE, DOMAIN
|
from homeassistant.components.bthome.const import CONF_SUBTYPE, DOMAIN
|
||||||
from homeassistant.components.device_automation import DeviceAutomationType
|
from homeassistant.components.device_automation import DeviceAutomationType
|
||||||
from homeassistant.const import CONF_DEVICE_ID, CONF_DOMAIN, CONF_PLATFORM, CONF_TYPE
|
from homeassistant.const import CONF_DEVICE_ID, CONF_DOMAIN, CONF_PLATFORM, CONF_TYPE
|
||||||
|
|
|
@ -10,8 +10,9 @@ from homeassistant.const import CONF_API_KEY
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.setup import async_setup_component
|
from homeassistant.setup import async_setup_component
|
||||||
|
|
||||||
|
from . import VALID_RESPONSE
|
||||||
|
|
||||||
from tests.common import MockConfigEntry
|
from tests.common import MockConfigEntry
|
||||||
from tests.components.co2signal import VALID_RESPONSE
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(name="electricity_maps")
|
@pytest.fixture(name="electricity_maps")
|
||||||
|
|
|
@ -12,6 +12,8 @@ from homeassistant.helpers import device_registry as dr, entity_registry as er
|
||||||
from homeassistant.helpers.entity_registry import RegistryEntryHider
|
from homeassistant.helpers.entity_registry import RegistryEntryHider
|
||||||
from homeassistant.setup import async_setup_component
|
from homeassistant.setup import async_setup_component
|
||||||
|
|
||||||
|
from .common import MockCover
|
||||||
|
|
||||||
from tests.common import (
|
from tests.common import (
|
||||||
MockConfigEntry,
|
MockConfigEntry,
|
||||||
async_get_device_automation_capabilities,
|
async_get_device_automation_capabilities,
|
||||||
|
@ -19,7 +21,6 @@ from tests.common import (
|
||||||
async_mock_service,
|
async_mock_service,
|
||||||
setup_test_component_platform,
|
setup_test_component_platform,
|
||||||
)
|
)
|
||||||
from tests.components.cover.common import MockCover
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
|
|
@ -20,6 +20,8 @@ from homeassistant.helpers import device_registry as dr, entity_registry as er
|
||||||
from homeassistant.helpers.entity_registry import RegistryEntryHider
|
from homeassistant.helpers.entity_registry import RegistryEntryHider
|
||||||
from homeassistant.setup import async_setup_component
|
from homeassistant.setup import async_setup_component
|
||||||
|
|
||||||
|
from .common import MockCover
|
||||||
|
|
||||||
from tests.common import (
|
from tests.common import (
|
||||||
MockConfigEntry,
|
MockConfigEntry,
|
||||||
async_get_device_automation_capabilities,
|
async_get_device_automation_capabilities,
|
||||||
|
@ -27,7 +29,6 @@ from tests.common import (
|
||||||
async_mock_service,
|
async_mock_service,
|
||||||
setup_test_component_platform,
|
setup_test_component_platform,
|
||||||
)
|
)
|
||||||
from tests.components.cover.common import MockCover
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
|
|
@ -22,6 +22,8 @@ from homeassistant.helpers.entity_registry import RegistryEntryHider
|
||||||
from homeassistant.setup import async_setup_component
|
from homeassistant.setup import async_setup_component
|
||||||
import homeassistant.util.dt as dt_util
|
import homeassistant.util.dt as dt_util
|
||||||
|
|
||||||
|
from .common import MockCover
|
||||||
|
|
||||||
from tests.common import (
|
from tests.common import (
|
||||||
MockConfigEntry,
|
MockConfigEntry,
|
||||||
async_fire_time_changed,
|
async_fire_time_changed,
|
||||||
|
@ -30,7 +32,6 @@ from tests.common import (
|
||||||
async_mock_service,
|
async_mock_service,
|
||||||
setup_test_component_platform,
|
setup_test_component_platform,
|
||||||
)
|
)
|
||||||
from tests.components.cover.common import MockCover
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
|
|
@ -17,12 +17,13 @@ from homeassistant.const import (
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.setup import async_setup_component
|
from homeassistant.setup import async_setup_component
|
||||||
|
|
||||||
|
from .common import MockCover
|
||||||
|
|
||||||
from tests.common import (
|
from tests.common import (
|
||||||
help_test_all,
|
help_test_all,
|
||||||
import_and_test_deprecated_constant_enum,
|
import_and_test_deprecated_constant_enum,
|
||||||
setup_test_component_platform,
|
setup_test_component_platform,
|
||||||
)
|
)
|
||||||
from tests.components.cover.common import MockCover
|
|
||||||
|
|
||||||
|
|
||||||
async def test_services(
|
async def test_services(
|
||||||
|
|
|
@ -12,8 +12,9 @@ from homeassistant.const import (
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.setup import async_setup_component
|
from homeassistant.setup import async_setup_component
|
||||||
|
|
||||||
|
from .common import MockDateEntity
|
||||||
|
|
||||||
from tests.common import setup_test_component_platform
|
from tests.common import setup_test_component_platform
|
||||||
from tests.components.date.common import MockDateEntity
|
|
||||||
|
|
||||||
|
|
||||||
async def test_date(hass: HomeAssistant) -> None:
|
async def test_date(hass: HomeAssistant) -> None:
|
||||||
|
|
|
@ -10,8 +10,9 @@ from homeassistant.const import ATTR_ENTITY_ID, ATTR_FRIENDLY_NAME, CONF_PLATFOR
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.setup import async_setup_component
|
from homeassistant.setup import async_setup_component
|
||||||
|
|
||||||
|
from .common import MockDateTimeEntity
|
||||||
|
|
||||||
from tests.common import setup_test_component_platform
|
from tests.common import setup_test_component_platform
|
||||||
from tests.components.datetime.common import MockDateTimeEntity
|
|
||||||
|
|
||||||
DEFAULT_VALUE = datetime(2020, 1, 1, 12, 0, 0, tzinfo=UTC)
|
DEFAULT_VALUE = datetime(2020, 1, 1, 12, 0, 0, tzinfo=UTC)
|
||||||
|
|
||||||
|
|
|
@ -11,8 +11,9 @@ from homeassistant.const import CONF_EMAIL, CONF_PASSWORD
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.setup import async_setup_component
|
from homeassistant.setup import async_setup_component
|
||||||
|
|
||||||
|
from .const import GET_METERS, LAST_READING, LAST_READING_GAS
|
||||||
|
|
||||||
from tests.common import MockConfigEntry
|
from tests.common import MockConfigEntry
|
||||||
from tests.components.discovergy.const import GET_METERS, LAST_READING, LAST_READING_GAS
|
|
||||||
|
|
||||||
|
|
||||||
def _meter_last_reading(meter_id: str) -> Reading:
|
def _meter_last_reading(meter_id: str) -> Reading:
|
||||||
|
|
|
@ -18,8 +18,8 @@ from homeassistant.components.ecobee.climate import (
|
||||||
from homeassistant.const import ATTR_ENTITY_ID, ATTR_SUPPORTED_FEATURES, STATE_OFF
|
from homeassistant.const import ATTR_ENTITY_ID, ATTR_SUPPORTED_FEATURES, STATE_OFF
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
|
|
||||||
from tests.components.ecobee import GENERIC_THERMOSTAT_INFO_WITH_HEATPUMP
|
from . import GENERIC_THERMOSTAT_INFO_WITH_HEATPUMP
|
||||||
from tests.components.ecobee.common import setup_platform
|
from .common import setup_platform
|
||||||
|
|
||||||
ENTITY_ID = "climate.ecobee"
|
ENTITY_ID = "climate.ecobee"
|
||||||
|
|
||||||
|
|
|
@ -12,10 +12,9 @@ from homeassistant.components.switch import DOMAIN, SERVICE_TURN_OFF, SERVICE_TU
|
||||||
from homeassistant.const import ATTR_ENTITY_ID
|
from homeassistant.const import ATTR_ENTITY_ID
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
|
|
||||||
|
from . import GENERIC_THERMOSTAT_INFO_WITH_HEATPUMP
|
||||||
from .common import setup_platform
|
from .common import setup_platform
|
||||||
|
|
||||||
from tests.components.ecobee import GENERIC_THERMOSTAT_INFO_WITH_HEATPUMP
|
|
||||||
|
|
||||||
VENTILATOR_20MIN_ID = "switch.ecobee_ventilator_20m_timer"
|
VENTILATOR_20MIN_ID = "switch.ecobee_ventilator_20m_timer"
|
||||||
THERMOSTAT_ID = 0
|
THERMOSTAT_ID = 0
|
||||||
|
|
||||||
|
|
|
@ -16,12 +16,13 @@ from homeassistant.core import HomeAssistant
|
||||||
import homeassistant.helpers.entity_registry as er
|
import homeassistant.helpers.entity_registry as er
|
||||||
from homeassistant.setup import async_setup_component
|
from homeassistant.setup import async_setup_component
|
||||||
|
|
||||||
|
from .common import MockFan
|
||||||
|
|
||||||
from tests.common import (
|
from tests.common import (
|
||||||
help_test_all,
|
help_test_all,
|
||||||
import_and_test_deprecated_constant_enum,
|
import_and_test_deprecated_constant_enum,
|
||||||
setup_test_component_platform,
|
setup_test_component_platform,
|
||||||
)
|
)
|
||||||
from tests.components.fan.common import MockFan
|
|
||||||
|
|
||||||
|
|
||||||
class BaseFan(FanEntity):
|
class BaseFan(FanEntity):
|
||||||
|
|
|
@ -8,8 +8,9 @@ from homeassistant.const import Platform
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.helpers import entity_registry as er
|
from homeassistant.helpers import entity_registry as er
|
||||||
|
|
||||||
|
from . import setup_with_selected_platforms
|
||||||
|
|
||||||
from tests.common import MockConfigEntry, snapshot_platform
|
from tests.common import MockConfigEntry, snapshot_platform
|
||||||
from tests.components.flexit_bacnet import setup_with_selected_platforms
|
|
||||||
|
|
||||||
|
|
||||||
async def test_binary_sensors(
|
async def test_binary_sensors(
|
||||||
|
|
|
@ -8,8 +8,9 @@ from homeassistant.const import Platform
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
import homeassistant.helpers.entity_registry as er
|
import homeassistant.helpers.entity_registry as er
|
||||||
|
|
||||||
|
from . import setup_with_selected_platforms
|
||||||
|
|
||||||
from tests.common import MockConfigEntry, snapshot_platform
|
from tests.common import MockConfigEntry, snapshot_platform
|
||||||
from tests.components.flexit_bacnet import setup_with_selected_platforms
|
|
||||||
|
|
||||||
|
|
||||||
async def test_climate_entity(
|
async def test_climate_entity(
|
||||||
|
|
|
@ -7,8 +7,9 @@ from homeassistant.config_entries import ConfigEntryState
|
||||||
from homeassistant.const import Platform
|
from homeassistant.const import Platform
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
|
|
||||||
|
from . import setup_with_selected_platforms
|
||||||
|
|
||||||
from tests.common import MockConfigEntry
|
from tests.common import MockConfigEntry
|
||||||
from tests.components.flexit_bacnet import setup_with_selected_platforms
|
|
||||||
|
|
||||||
|
|
||||||
async def test_loading_and_unloading_config_entry(
|
async def test_loading_and_unloading_config_entry(
|
||||||
|
|
|
@ -13,8 +13,9 @@ from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.exceptions import HomeAssistantError
|
from homeassistant.exceptions import HomeAssistantError
|
||||||
from homeassistant.helpers import entity_registry as er
|
from homeassistant.helpers import entity_registry as er
|
||||||
|
|
||||||
|
from . import setup_with_selected_platforms
|
||||||
|
|
||||||
from tests.common import MockConfigEntry, snapshot_platform
|
from tests.common import MockConfigEntry, snapshot_platform
|
||||||
from tests.components.flexit_bacnet import setup_with_selected_platforms
|
|
||||||
|
|
||||||
ENTITY_ID = "number.device_name_fireplace_supply_fan_setpoint"
|
ENTITY_ID = "number.device_name_fireplace_supply_fan_setpoint"
|
||||||
|
|
||||||
|
|
|
@ -8,8 +8,9 @@ from homeassistant.const import Platform
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.helpers import entity_registry as er
|
from homeassistant.helpers import entity_registry as er
|
||||||
|
|
||||||
|
from . import setup_with_selected_platforms
|
||||||
|
|
||||||
from tests.common import MockConfigEntry, snapshot_platform
|
from tests.common import MockConfigEntry, snapshot_platform
|
||||||
from tests.components.flexit_bacnet import setup_with_selected_platforms
|
|
||||||
|
|
||||||
|
|
||||||
async def test_sensors(
|
async def test_sensors(
|
||||||
|
|
|
@ -16,8 +16,9 @@ from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.exceptions import HomeAssistantError
|
from homeassistant.exceptions import HomeAssistantError
|
||||||
from homeassistant.helpers import entity_registry as er
|
from homeassistant.helpers import entity_registry as er
|
||||||
|
|
||||||
|
from . import setup_with_selected_platforms
|
||||||
|
|
||||||
from tests.common import MockConfigEntry, snapshot_platform
|
from tests.common import MockConfigEntry, snapshot_platform
|
||||||
from tests.components.flexit_bacnet import setup_with_selected_platforms
|
|
||||||
|
|
||||||
ENTITY_ID = "switch.device_name_electric_heater"
|
ENTITY_ID = "switch.device_name_electric_heater"
|
||||||
|
|
||||||
|
|
|
@ -28,9 +28,10 @@ from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.helpers import entity_registry as er
|
from homeassistant.helpers import entity_registry as er
|
||||||
from homeassistant.util import dt as dt_util
|
from homeassistant.util import dt as dt_util
|
||||||
|
|
||||||
|
from . import _generate_mock_feed_entry
|
||||||
|
from .conftest import URL
|
||||||
|
|
||||||
from tests.common import MockConfigEntry, async_fire_time_changed
|
from tests.common import MockConfigEntry, async_fire_time_changed
|
||||||
from tests.components.geo_json_events import _generate_mock_feed_entry
|
|
||||||
from tests.components.geo_json_events.conftest import URL
|
|
||||||
|
|
||||||
CONFIG_LEGACY = {
|
CONFIG_LEGACY = {
|
||||||
GEO_LOCATION_DOMAIN: [
|
GEO_LOCATION_DOMAIN: [
|
||||||
|
|
|
@ -7,8 +7,9 @@ from homeassistant.components.geo_location import DOMAIN as GEO_LOCATION_DOMAIN
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.helpers import entity_registry as er
|
from homeassistant.helpers import entity_registry as er
|
||||||
|
|
||||||
|
from . import _generate_mock_feed_entry
|
||||||
|
|
||||||
from tests.common import MockConfigEntry
|
from tests.common import MockConfigEntry
|
||||||
from tests.components.geo_json_events import _generate_mock_feed_entry
|
|
||||||
|
|
||||||
|
|
||||||
async def test_component_unload_config_entry(
|
async def test_component_unload_config_entry(
|
||||||
|
|
|
@ -19,13 +19,14 @@ from homeassistant.config_entries import ConfigEntryState
|
||||||
from homeassistant.core import HomeAssistant, ServiceCall
|
from homeassistant.core import HomeAssistant, ServiceCall
|
||||||
from homeassistant.setup import async_setup_component
|
from homeassistant.setup import async_setup_component
|
||||||
|
|
||||||
|
from .const import FAKE_BRIDGE, FAKE_BRIDGE_DEVICE
|
||||||
|
|
||||||
from tests.common import (
|
from tests.common import (
|
||||||
MockConfigEntry,
|
MockConfigEntry,
|
||||||
async_mock_service,
|
async_mock_service,
|
||||||
load_fixture,
|
load_fixture,
|
||||||
mock_device_registry,
|
mock_device_registry,
|
||||||
)
|
)
|
||||||
from tests.components.hue.const import FAKE_BRIDGE, FAKE_BRIDGE_DEVICE
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(autouse=True)
|
@pytest.fixture(autouse=True)
|
||||||
|
|
|
@ -12,7 +12,7 @@ from homeassistant.const import CONF_LATITUDE, CONF_LONGITUDE, CONF_NAME
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.data_entry_flow import FlowResultType
|
from homeassistant.data_entry_flow import FlowResultType
|
||||||
|
|
||||||
from tests.components.ipma import MockLocation
|
from . import MockLocation
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(name="ipma_setup", autouse=True)
|
@pytest.fixture(name="ipma_setup", autouse=True)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue