Improve blueprint test fixtures (#93519)
This commit is contained in:
parent
393dbb6dc0
commit
3cca338c6e
76 changed files with 400 additions and 81 deletions
|
@ -28,7 +28,11 @@ from tests.common import (
|
||||||
async_get_device_automation_capabilities,
|
async_get_device_automation_capabilities,
|
||||||
async_get_device_automations,
|
async_get_device_automations,
|
||||||
)
|
)
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
|
|
|
@ -27,7 +27,11 @@ from tests.common import (
|
||||||
async_get_device_automations,
|
async_get_device_automations,
|
||||||
async_mock_service,
|
async_mock_service,
|
||||||
)
|
)
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
|
|
@ -32,7 +32,11 @@ from tests.common import (
|
||||||
async_get_device_automations,
|
async_get_device_automations,
|
||||||
async_mock_service,
|
async_mock_service,
|
||||||
)
|
)
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
|
|
@ -13,7 +13,11 @@ from tests.common import (
|
||||||
async_get_device_automations,
|
async_get_device_automations,
|
||||||
async_mock_service,
|
async_mock_service,
|
||||||
)
|
)
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
"""Conftest for automation tests."""
|
"""Conftest for automation tests."""
|
||||||
|
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
import pytest
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
|
@ -21,7 +21,11 @@ from tests.common import (
|
||||||
async_get_device_automations,
|
async_get_device_automations,
|
||||||
async_mock_service,
|
async_mock_service,
|
||||||
)
|
)
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
|
|
@ -21,7 +21,11 @@ from tests.common import (
|
||||||
async_get_device_automations,
|
async_get_device_automations,
|
||||||
async_mock_service,
|
async_mock_service,
|
||||||
)
|
)
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
|
11
tests/components/blueprint/common.py
Normal file
11
tests/components/blueprint/common.py
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
"""Blueprints test helpers."""
|
||||||
|
|
||||||
|
from unittest.mock import patch
|
||||||
|
|
||||||
|
|
||||||
|
def stub_blueprint_populate_fixture_helper():
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
with patch(
|
||||||
|
"homeassistant.components.blueprint.models.DomainBlueprints.async_populate"
|
||||||
|
):
|
||||||
|
yield
|
|
@ -1,14 +1,8 @@
|
||||||
"""Blueprints conftest."""
|
"""Blueprints conftest."""
|
||||||
|
|
||||||
from unittest.mock import patch
|
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(autouse=True)
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
def stub_blueprint_populate():
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
"""Stub copying the blueprints to the config folder."""
|
"""Stub copying the blueprints to the config folder."""
|
||||||
with patch(
|
|
||||||
"homeassistant.components.blueprint.models.DomainBlueprints.async_populate"
|
|
||||||
):
|
|
||||||
yield
|
|
||||||
|
|
|
@ -21,7 +21,11 @@ from tests.common import (
|
||||||
async_get_device_automations,
|
async_get_device_automations,
|
||||||
async_mock_service,
|
async_mock_service,
|
||||||
)
|
)
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
|
|
|
@ -21,7 +21,11 @@ from tests.common import (
|
||||||
async_get_device_automations,
|
async_get_device_automations,
|
||||||
async_mock_service,
|
async_mock_service,
|
||||||
)
|
)
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
|
|
@ -27,7 +27,11 @@ from tests.common import (
|
||||||
async_get_device_automations,
|
async_get_device_automations,
|
||||||
async_mock_service,
|
async_mock_service,
|
||||||
)
|
)
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
|
|
@ -10,10 +10,14 @@ from homeassistant.components import config
|
||||||
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 tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
from tests.typing import ClientSessionGenerator
|
from tests.typing import ClientSessionGenerator
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
async def setup_automation(
|
async def setup_automation(
|
||||||
hass, automation_config, stub_blueprint_populate # noqa: F811
|
hass, automation_config, stub_blueprint_populate # noqa: F811
|
||||||
|
|
|
@ -7,10 +7,14 @@ from homeassistant.helpers import device_registry as dr
|
||||||
from homeassistant.setup import async_setup_component
|
from homeassistant.setup import async_setup_component
|
||||||
|
|
||||||
from tests.common import MockConfigEntry, MockModule, mock_integration
|
from tests.common import MockConfigEntry, MockModule, mock_integration
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
from tests.typing import WebSocketGenerator
|
from tests.typing import WebSocketGenerator
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def client(hass, hass_ws_client):
|
def client(hass, hass_ws_client):
|
||||||
"""Fixture that can interact with the config manager API."""
|
"""Fixture that can interact with the config manager API."""
|
||||||
|
|
|
@ -10,10 +10,14 @@ from homeassistant.components import config
|
||||||
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 tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
from tests.typing import ClientSessionGenerator
|
from tests.typing import ClientSessionGenerator
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(autouse=True)
|
@pytest.fixture(autouse=True)
|
||||||
async def setup_script(hass, script_config, stub_blueprint_populate): # noqa: F811
|
async def setup_script(hass, script_config, stub_blueprint_populate): # noqa: F811
|
||||||
"""Set up script integration."""
|
"""Set up script integration."""
|
||||||
|
|
|
@ -35,6 +35,16 @@ def entity_registry_enabled_by_default() -> Generator[None, None, None]:
|
||||||
yield
|
yield
|
||||||
|
|
||||||
|
|
||||||
|
# Blueprint test fixtures
|
||||||
|
@pytest.fixture(name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_fixture():
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
from tests.components.blueprint.common import stub_blueprint_populate_fixture_helper
|
||||||
|
|
||||||
|
yield from stub_blueprint_populate_fixture_helper()
|
||||||
|
|
||||||
|
|
||||||
|
# TTS test fixtures
|
||||||
@pytest.fixture(name="mock_tts_get_cache_files")
|
@pytest.fixture(name="mock_tts_get_cache_files")
|
||||||
def mock_tts_get_cache_files_fixture():
|
def mock_tts_get_cache_files_fixture():
|
||||||
"""Mock the list TTS cache function."""
|
"""Mock the list TTS cache function."""
|
||||||
|
|
|
@ -17,7 +17,11 @@ from tests.common import (
|
||||||
async_get_device_automations,
|
async_get_device_automations,
|
||||||
async_mock_service,
|
async_mock_service,
|
||||||
)
|
)
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
|
|
|
@ -25,7 +25,11 @@ from tests.common import (
|
||||||
async_get_device_automations,
|
async_get_device_automations,
|
||||||
async_mock_service,
|
async_mock_service,
|
||||||
)
|
)
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
|
|
@ -28,7 +28,11 @@ from tests.common import (
|
||||||
async_get_device_automations,
|
async_get_device_automations,
|
||||||
async_mock_service,
|
async_mock_service,
|
||||||
)
|
)
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
|
|
@ -36,10 +36,14 @@ from tests.common import (
|
||||||
async_get_device_automations,
|
async_get_device_automations,
|
||||||
async_mock_service,
|
async_mock_service,
|
||||||
)
|
)
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
from tests.test_util.aiohttp import AiohttpClientMocker
|
from tests.test_util.aiohttp import AiohttpClientMocker
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def automation_calls(hass):
|
def automation_calls(hass):
|
||||||
"""Track automation calls to a mock service."""
|
"""Track automation calls to a mock service."""
|
||||||
|
|
|
@ -7,7 +7,10 @@ from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.helpers import recorder as recorder_helper
|
from homeassistant.helpers import recorder as recorder_helper
|
||||||
from homeassistant.setup import async_setup_component
|
from homeassistant.setup import async_setup_component
|
||||||
|
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(autouse=True)
|
@pytest.fixture(autouse=True)
|
||||||
|
|
|
@ -4,10 +4,14 @@ import pytest
|
||||||
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 tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
from tests.components.light.conftest import mock_light_profiles # noqa: F401
|
from tests.components.light.conftest import mock_light_profiles # noqa: F401
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(autouse=True)
|
@pytest.fixture(autouse=True)
|
||||||
async def setup_homeassistant(hass: HomeAssistant):
|
async def setup_homeassistant(hass: HomeAssistant):
|
||||||
"""Set up the homeassistant integration."""
|
"""Set up the homeassistant integration."""
|
||||||
|
|
|
@ -28,10 +28,14 @@ from tests.common import (
|
||||||
mock_integration,
|
mock_integration,
|
||||||
mock_platform,
|
mock_platform,
|
||||||
)
|
)
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
from tests.typing import WebSocketGenerator
|
from tests.typing import WebSocketGenerator
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def fake_integration(hass):
|
def fake_integration(hass):
|
||||||
"""Set up a mock integration with device automation support."""
|
"""Set up a mock integration with device automation support."""
|
||||||
|
|
|
@ -10,7 +10,11 @@ from homeassistant.setup import async_setup_component
|
||||||
import homeassistant.util.dt as dt_util
|
import homeassistant.util.dt as dt_util
|
||||||
|
|
||||||
from tests.common import async_fire_time_changed, async_mock_service
|
from tests.common import async_fire_time_changed, async_mock_service
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
|
|
@ -16,7 +16,11 @@ from tests.common import (
|
||||||
async_get_device_automations,
|
async_get_device_automations,
|
||||||
async_mock_service,
|
async_mock_service,
|
||||||
)
|
)
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
|
|
@ -22,7 +22,12 @@ from tests.common import (
|
||||||
async_get_device_automations,
|
async_get_device_automations,
|
||||||
async_mock_service,
|
async_mock_service,
|
||||||
)
|
)
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
AWAY_LATITUDE = 32.881011
|
AWAY_LATITUDE = 32.881011
|
||||||
AWAY_LONGITUDE = -117.234758
|
AWAY_LONGITUDE = -117.234758
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
"""Conftest for emulated_hue tests."""
|
"""Conftest for emulated_hue tests."""
|
||||||
|
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
import pytest
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
|
@ -16,7 +16,11 @@ from tests.common import (
|
||||||
async_get_device_automations,
|
async_get_device_automations,
|
||||||
async_mock_service,
|
async_mock_service,
|
||||||
)
|
)
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
async def test_get_actions(
|
async def test_get_actions(
|
||||||
|
|
|
@ -16,7 +16,11 @@ from tests.common import (
|
||||||
async_get_device_automations,
|
async_get_device_automations,
|
||||||
async_mock_service,
|
async_mock_service,
|
||||||
)
|
)
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
|
|
@ -21,7 +21,11 @@ from tests.common import (
|
||||||
async_get_device_automations,
|
async_get_device_automations,
|
||||||
async_mock_service,
|
async_mock_service,
|
||||||
)
|
)
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
|
|
@ -14,7 +14,11 @@ from homeassistant.core import Context, HomeAssistant
|
||||||
from homeassistant.setup import async_setup_component
|
from homeassistant.setup import async_setup_component
|
||||||
|
|
||||||
from tests.common import async_mock_service, mock_component
|
from tests.common import async_mock_service, mock_component
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
"""Conftest for HA triggers."""
|
"""Conftest for HA triggers."""
|
||||||
|
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
import pytest
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
|
@ -18,7 +18,11 @@ from tests.common import (
|
||||||
async_get_device_automations,
|
async_get_device_automations,
|
||||||
async_mock_service,
|
async_mock_service,
|
||||||
)
|
)
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
|
|
@ -21,7 +21,11 @@ from tests.common import (
|
||||||
async_get_device_automations,
|
async_get_device_automations,
|
||||||
async_mock_service,
|
async_mock_service,
|
||||||
)
|
)
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
|
|
|
@ -21,7 +21,11 @@ from tests.common import (
|
||||||
async_get_device_automations,
|
async_get_device_automations,
|
||||||
async_mock_service,
|
async_mock_service,
|
||||||
)
|
)
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
|
|
@ -31,7 +31,11 @@ from tests.common import (
|
||||||
async_get_device_automations,
|
async_get_device_automations,
|
||||||
async_mock_service,
|
async_mock_service,
|
||||||
)
|
)
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
|
|
@ -16,7 +16,11 @@ from tests.common import (
|
||||||
async_get_device_automations,
|
async_get_device_automations,
|
||||||
async_mock_service,
|
async_mock_service,
|
||||||
)
|
)
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
|
|
@ -24,7 +24,11 @@ from tests.common import (
|
||||||
async_get_device_automations,
|
async_get_device_automations,
|
||||||
async_mock_service,
|
async_mock_service,
|
||||||
)
|
)
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
|
|
@ -21,7 +21,11 @@ from tests.common import (
|
||||||
async_get_device_automations,
|
async_get_device_automations,
|
||||||
async_mock_service,
|
async_mock_service,
|
||||||
)
|
)
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
|
|
@ -21,7 +21,11 @@ from tests.common import (
|
||||||
async_get_device_automations,
|
async_get_device_automations,
|
||||||
async_mock_service,
|
async_mock_service,
|
||||||
)
|
)
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
|
|
@ -14,7 +14,12 @@ import homeassistant.util.dt as dt_util
|
||||||
from . import async_init_integration
|
from . import async_init_integration
|
||||||
|
|
||||||
from tests.common import async_fire_time_changed_exact, async_mock_service
|
from tests.common import async_fire_time_changed_exact, async_mock_service
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,11 @@ from tests.common import (
|
||||||
async_get_device_automations,
|
async_get_device_automations,
|
||||||
async_mock_service,
|
async_mock_service,
|
||||||
)
|
)
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
|
|
|
@ -23,7 +23,11 @@ from tests.common import (
|
||||||
async_get_device_automations,
|
async_get_device_automations,
|
||||||
async_mock_service,
|
async_mock_service,
|
||||||
)
|
)
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
|
|
@ -28,7 +28,11 @@ from tests.common import (
|
||||||
async_get_device_automations,
|
async_get_device_automations,
|
||||||
async_mock_service,
|
async_mock_service,
|
||||||
)
|
)
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
"""Conftest for script tests."""
|
"""Conftest for script tests."""
|
||||||
|
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
import pytest
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
|
@ -24,7 +24,11 @@ from tests.common import (
|
||||||
async_get_device_automations,
|
async_get_device_automations,
|
||||||
async_mock_service,
|
async_mock_service,
|
||||||
)
|
)
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
|
|
@ -29,7 +29,11 @@ from tests.common import (
|
||||||
async_get_device_automations,
|
async_get_device_automations,
|
||||||
async_mock_service,
|
async_mock_service,
|
||||||
)
|
)
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
|
|
@ -2,10 +2,14 @@
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
from tests.components.light.conftest import mock_light_profiles # noqa: F401
|
from tests.components.light.conftest import mock_light_profiles # noqa: F401
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(autouse=True)
|
@pytest.fixture(autouse=True)
|
||||||
def patch_hass_config(mock_hass_config: None) -> None:
|
def patch_hass_config(mock_hass_config: None) -> None:
|
||||||
"""Patch configuration.yaml."""
|
"""Patch configuration.yaml."""
|
||||||
|
|
|
@ -22,10 +22,14 @@ from tests.common import (
|
||||||
async_get_device_automations,
|
async_get_device_automations,
|
||||||
async_mock_service,
|
async_mock_service,
|
||||||
)
|
)
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
from tests.typing import MqttMockHAClient, MqttMockHAClientGenerator, WebSocketGenerator
|
from tests.typing import MqttMockHAClient, MqttMockHAClientGenerator, WebSocketGenerator
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def calls(hass: HomeAssistant) -> list[ServiceCall]:
|
def calls(hass: HomeAssistant) -> list[ServiceCall]:
|
||||||
"""Track calls to a mock service."""
|
"""Track calls to a mock service."""
|
||||||
|
|
|
@ -9,7 +9,11 @@ from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.setup import async_setup_component
|
from homeassistant.setup import async_setup_component
|
||||||
|
|
||||||
from tests.common import async_fire_mqtt_message, async_mock_service, mock_component
|
from tests.common import async_fire_mqtt_message, async_mock_service, mock_component
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
|
|
@ -21,7 +21,11 @@ from tests.common import (
|
||||||
async_get_device_automations,
|
async_get_device_automations,
|
||||||
async_mock_service,
|
async_mock_service,
|
||||||
)
|
)
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
async def test_get_actions(
|
async def test_get_actions(
|
||||||
|
|
|
@ -12,7 +12,11 @@ from tests.common import (
|
||||||
async_get_device_automations,
|
async_get_device_automations,
|
||||||
async_mock_service,
|
async_mock_service,
|
||||||
)
|
)
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
|
|
@ -16,7 +16,11 @@ from tests.common import (
|
||||||
async_get_device_automations,
|
async_get_device_automations,
|
||||||
async_mock_service,
|
async_mock_service,
|
||||||
)
|
)
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
|
|
@ -21,7 +21,11 @@ from tests.common import (
|
||||||
async_get_device_automations,
|
async_get_device_automations,
|
||||||
async_mock_service,
|
async_mock_service,
|
||||||
)
|
)
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
|
|
@ -21,7 +21,11 @@ from tests.common import (
|
||||||
async_get_device_automations,
|
async_get_device_automations,
|
||||||
async_mock_service,
|
async_mock_service,
|
||||||
)
|
)
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
"""Conftest for script tests."""
|
"""Conftest for script tests."""
|
||||||
|
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
import pytest
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
"""Tests for Search integration."""
|
"""Tests for Search integration."""
|
||||||
|
import pytest
|
||||||
|
|
||||||
from homeassistant.components import search
|
from homeassistant.components import search
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.helpers import (
|
from homeassistant.helpers import (
|
||||||
|
@ -10,9 +12,14 @@ from homeassistant.helpers import (
|
||||||
from homeassistant.setup import async_setup_component
|
from homeassistant.setup import async_setup_component
|
||||||
|
|
||||||
from tests.common import MockConfigEntry
|
from tests.common import MockConfigEntry
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
from tests.typing import WebSocketGenerator
|
from tests.typing import WebSocketGenerator
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
MOCK_ENTITY_SOURCES = {
|
MOCK_ENTITY_SOURCES = {
|
||||||
"light.platform_config_source": {
|
"light.platform_config_source": {
|
||||||
"source": entity.SOURCE_PLATFORM_CONFIG,
|
"source": entity.SOURCE_PLATFORM_CONFIG,
|
||||||
|
|
|
@ -26,10 +26,14 @@ from tests.common import (
|
||||||
async_get_device_automations,
|
async_get_device_automations,
|
||||||
async_mock_service,
|
async_mock_service,
|
||||||
)
|
)
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
from tests.testing_config.custom_components.test.sensor import UNITS_OF_MEASUREMENT
|
from tests.testing_config.custom_components.test.sensor import UNITS_OF_MEASUREMENT
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def calls(hass: HomeAssistant) -> list[ServiceCall]:
|
def calls(hass: HomeAssistant) -> list[ServiceCall]:
|
||||||
"""Track calls to a mock service."""
|
"""Track calls to a mock service."""
|
||||||
|
|
|
@ -30,10 +30,14 @@ from tests.common import (
|
||||||
async_get_device_automations,
|
async_get_device_automations,
|
||||||
async_mock_service,
|
async_mock_service,
|
||||||
)
|
)
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
from tests.testing_config.custom_components.test.sensor import UNITS_OF_MEASUREMENT
|
from tests.testing_config.custom_components.test.sensor import UNITS_OF_MEASUREMENT
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def calls(hass: HomeAssistant) -> list[ServiceCall]:
|
def calls(hass: HomeAssistant) -> list[ServiceCall]:
|
||||||
"""Track calls to a mock service."""
|
"""Track calls to a mock service."""
|
||||||
|
|
|
@ -19,7 +19,11 @@ from homeassistant.setup import async_setup_component
|
||||||
import homeassistant.util.dt as dt_util
|
import homeassistant.util.dt as dt_util
|
||||||
|
|
||||||
from tests.common import async_fire_time_changed, async_mock_service, mock_component
|
from tests.common import async_fire_time_changed, async_mock_service, mock_component
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
|
|
@ -16,7 +16,11 @@ from tests.common import (
|
||||||
async_get_device_automations,
|
async_get_device_automations,
|
||||||
async_mock_service,
|
async_mock_service,
|
||||||
)
|
)
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
|
|
@ -21,7 +21,11 @@ from tests.common import (
|
||||||
async_get_device_automations,
|
async_get_device_automations,
|
||||||
async_mock_service,
|
async_mock_service,
|
||||||
)
|
)
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
|
|
@ -21,7 +21,11 @@ from tests.common import (
|
||||||
async_get_device_automations,
|
async_get_device_automations,
|
||||||
async_mock_service,
|
async_mock_service,
|
||||||
)
|
)
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
|
|
@ -9,7 +9,11 @@ from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.setup import async_setup_component
|
from homeassistant.setup import async_setup_component
|
||||||
|
|
||||||
from tests.common import async_mock_service
|
from tests.common import async_mock_service
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
|
|
@ -22,10 +22,14 @@ from tests.common import (
|
||||||
async_fire_mqtt_message,
|
async_fire_mqtt_message,
|
||||||
async_get_device_automations,
|
async_get_device_automations,
|
||||||
)
|
)
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
from tests.typing import MqttMockHAClient, WebSocketGenerator
|
from tests.typing import MqttMockHAClient, WebSocketGenerator
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
async def test_get_triggers_btn(
|
async def test_get_triggers_btn(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
device_reg,
|
device_reg,
|
||||||
|
|
|
@ -21,7 +21,11 @@ from tests.common import (
|
||||||
async_get_device_automations,
|
async_get_device_automations,
|
||||||
async_mock_service,
|
async_mock_service,
|
||||||
)
|
)
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
async def test_get_actions(
|
async def test_get_actions(
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
"""Conftest for trace tests."""
|
"""Conftest for trace tests."""
|
||||||
|
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
import pytest
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
|
@ -20,7 +20,11 @@ from tests.common import (
|
||||||
async_get_device_automations,
|
async_get_device_automations,
|
||||||
async_mock_service,
|
async_mock_service,
|
||||||
)
|
)
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
|
|
@ -16,7 +16,11 @@ from tests.common import (
|
||||||
async_get_device_automations,
|
async_get_device_automations,
|
||||||
async_mock_service,
|
async_mock_service,
|
||||||
)
|
)
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
async def test_get_actions(
|
async def test_get_actions(
|
||||||
|
|
|
@ -21,7 +21,11 @@ from tests.common import (
|
||||||
async_get_device_automations,
|
async_get_device_automations,
|
||||||
async_mock_service,
|
async_mock_service,
|
||||||
)
|
)
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
|
|
@ -21,7 +21,11 @@ from tests.common import (
|
||||||
async_get_device_automations,
|
async_get_device_automations,
|
||||||
async_mock_service,
|
async_mock_service,
|
||||||
)
|
)
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
|
|
@ -16,7 +16,11 @@ from tests.common import (
|
||||||
async_get_device_automations,
|
async_get_device_automations,
|
||||||
async_mock_service,
|
async_mock_service,
|
||||||
)
|
)
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
async def test_get_actions(
|
async def test_get_actions(
|
||||||
|
|
|
@ -7,10 +7,14 @@ import pytest
|
||||||
from homeassistant.core import HomeAssistant, callback
|
from homeassistant.core import HomeAssistant, callback
|
||||||
from homeassistant.setup import async_setup_component
|
from homeassistant.setup import async_setup_component
|
||||||
|
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
from tests.typing import ClientSessionGenerator
|
from tests.typing import ClientSessionGenerator
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(autouse=True)
|
@pytest.fixture(autouse=True)
|
||||||
async def setup_http(hass):
|
async def setup_http(hass):
|
||||||
"""Set up http."""
|
"""Set up http."""
|
||||||
|
|
|
@ -24,7 +24,12 @@ from tests.common import (
|
||||||
async_mock_service,
|
async_mock_service,
|
||||||
mock_coro,
|
mock_coro,
|
||||||
)
|
)
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
SHORT_PRESS = "remote_button_short_press"
|
SHORT_PRESS = "remote_button_short_press"
|
||||||
COMMAND = "command"
|
COMMAND = "command"
|
||||||
|
|
|
@ -24,7 +24,12 @@ from tests.common import (
|
||||||
async_get_device_automations,
|
async_get_device_automations,
|
||||||
async_mock_service,
|
async_mock_service,
|
||||||
)
|
)
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
ON = 1
|
ON = 1
|
||||||
OFF = 0
|
OFF = 0
|
||||||
|
|
|
@ -8,7 +8,11 @@ from homeassistant.helpers import entity_registry as er
|
||||||
from homeassistant.setup import async_setup_component
|
from homeassistant.setup import async_setup_component
|
||||||
|
|
||||||
from tests.common import async_mock_service, mock_component
|
from tests.common import async_mock_service, mock_component
|
||||||
from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401
|
|
||||||
|
|
||||||
|
@pytest.fixture(autouse=True, name="stub_blueprint_populate")
|
||||||
|
def stub_blueprint_populate_autouse(stub_blueprint_populate):
|
||||||
|
"""Stub copying the blueprints to the config folder."""
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue