diff --git a/tests/components/alarm_control_panel/test_device_action.py b/tests/components/alarm_control_panel/test_device_action.py index 0c6731c92be..5c9f6622905 100644 --- a/tests/components/alarm_control_panel/test_device_action.py +++ b/tests/components/alarm_control_panel/test_device_action.py @@ -28,7 +28,11 @@ from tests.common import ( async_get_device_automation_capabilities, 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( diff --git a/tests/components/alarm_control_panel/test_device_condition.py b/tests/components/alarm_control_panel/test_device_condition.py index 7a3ca14e0cc..d56ddccab64 100644 --- a/tests/components/alarm_control_panel/test_device_condition.py +++ b/tests/components/alarm_control_panel/test_device_condition.py @@ -27,7 +27,11 @@ from tests.common import ( async_get_device_automations, 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 diff --git a/tests/components/alarm_control_panel/test_device_trigger.py b/tests/components/alarm_control_panel/test_device_trigger.py index f6eeef952bd..0cdcf1d8850 100644 --- a/tests/components/alarm_control_panel/test_device_trigger.py +++ b/tests/components/alarm_control_panel/test_device_trigger.py @@ -32,7 +32,11 @@ from tests.common import ( async_get_device_automations, 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 diff --git a/tests/components/arcam_fmj/test_device_trigger.py b/tests/components/arcam_fmj/test_device_trigger.py index 64eef53c31a..48561f251b3 100644 --- a/tests/components/arcam_fmj/test_device_trigger.py +++ b/tests/components/arcam_fmj/test_device_trigger.py @@ -13,7 +13,11 @@ from tests.common import ( async_get_device_automations, 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 diff --git a/tests/components/automation/conftest.py b/tests/components/automation/conftest.py index 438948e8475..1aa56bbf9b9 100644 --- a/tests/components/automation/conftest.py +++ b/tests/components/automation/conftest.py @@ -1,3 +1,8 @@ """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.""" diff --git a/tests/components/binary_sensor/test_device_condition.py b/tests/components/binary_sensor/test_device_condition.py index ecc5f7bc8b0..2e1f77aa091 100644 --- a/tests/components/binary_sensor/test_device_condition.py +++ b/tests/components/binary_sensor/test_device_condition.py @@ -21,7 +21,11 @@ from tests.common import ( async_get_device_automations, 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 diff --git a/tests/components/binary_sensor/test_device_trigger.py b/tests/components/binary_sensor/test_device_trigger.py index 1866b155da3..7f2cf7a5ba5 100644 --- a/tests/components/binary_sensor/test_device_trigger.py +++ b/tests/components/binary_sensor/test_device_trigger.py @@ -21,7 +21,11 @@ from tests.common import ( async_get_device_automations, 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 diff --git a/tests/components/blueprint/common.py b/tests/components/blueprint/common.py new file mode 100644 index 00000000000..28dad51d4f4 --- /dev/null +++ b/tests/components/blueprint/common.py @@ -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 diff --git a/tests/components/blueprint/conftest.py b/tests/components/blueprint/conftest.py index fe0df5d8260..2f54fb6092e 100644 --- a/tests/components/blueprint/conftest.py +++ b/tests/components/blueprint/conftest.py @@ -1,14 +1,8 @@ """Blueprints conftest.""" -from unittest.mock import patch - import pytest -@pytest.fixture(autouse=True) -def stub_blueprint_populate(): +@pytest.fixture(autouse=True, name="stub_blueprint_populate") +def stub_blueprint_populate_autouse(stub_blueprint_populate): """Stub copying the blueprints to the config folder.""" - with patch( - "homeassistant.components.blueprint.models.DomainBlueprints.async_populate" - ): - yield diff --git a/tests/components/climate/test_device_action.py b/tests/components/climate/test_device_action.py index cec7722ddc8..afbbccf70ec 100644 --- a/tests/components/climate/test_device_action.py +++ b/tests/components/climate/test_device_action.py @@ -21,7 +21,11 @@ from tests.common import ( async_get_device_automations, 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( diff --git a/tests/components/climate/test_device_condition.py b/tests/components/climate/test_device_condition.py index 44ce904bf9e..7d90e92101c 100644 --- a/tests/components/climate/test_device_condition.py +++ b/tests/components/climate/test_device_condition.py @@ -21,7 +21,11 @@ from tests.common import ( async_get_device_automations, 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 diff --git a/tests/components/climate/test_device_trigger.py b/tests/components/climate/test_device_trigger.py index 54f89290a45..14d21b41e01 100644 --- a/tests/components/climate/test_device_trigger.py +++ b/tests/components/climate/test_device_trigger.py @@ -27,7 +27,11 @@ from tests.common import ( async_get_device_automations, 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 diff --git a/tests/components/config/test_automation.py b/tests/components/config/test_automation.py index dcc76d9df0c..5122c7ec749 100644 --- a/tests/components/config/test_automation.py +++ b/tests/components/config/test_automation.py @@ -10,10 +10,14 @@ from homeassistant.components import config from homeassistant.core import HomeAssistant from homeassistant.helpers import entity_registry as er -from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401 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 async def setup_automation( hass, automation_config, stub_blueprint_populate # noqa: F811 diff --git a/tests/components/config/test_device_registry.py b/tests/components/config/test_device_registry.py index fef7bad9898..aa08a705f46 100644 --- a/tests/components/config/test_device_registry.py +++ b/tests/components/config/test_device_registry.py @@ -7,10 +7,14 @@ from homeassistant.helpers import device_registry as dr from homeassistant.setup import async_setup_component from tests.common import MockConfigEntry, MockModule, mock_integration -from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401 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 def client(hass, hass_ws_client): """Fixture that can interact with the config manager API.""" diff --git a/tests/components/config/test_script.py b/tests/components/config/test_script.py index c151157b937..934d7ef7b89 100644 --- a/tests/components/config/test_script.py +++ b/tests/components/config/test_script.py @@ -10,10 +10,14 @@ from homeassistant.components import config from homeassistant.core import HomeAssistant from homeassistant.helpers import entity_registry as er -from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401 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) async def setup_script(hass, script_config, stub_blueprint_populate): # noqa: F811 """Set up script integration.""" diff --git a/tests/components/conftest.py b/tests/components/conftest.py index ff58909126a..1deb857c315 100644 --- a/tests/components/conftest.py +++ b/tests/components/conftest.py @@ -35,6 +35,16 @@ def entity_registry_enabled_by_default() -> Generator[None, None, None]: 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") def mock_tts_get_cache_files_fixture(): """Mock the list TTS cache function.""" diff --git a/tests/components/cover/test_device_action.py b/tests/components/cover/test_device_action.py index 354e840e548..a67c84a5059 100644 --- a/tests/components/cover/test_device_action.py +++ b/tests/components/cover/test_device_action.py @@ -17,7 +17,11 @@ from tests.common import ( async_get_device_automations, 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( diff --git a/tests/components/cover/test_device_condition.py b/tests/components/cover/test_device_condition.py index d8f9b9547fd..1eb3aa22a06 100644 --- a/tests/components/cover/test_device_condition.py +++ b/tests/components/cover/test_device_condition.py @@ -25,7 +25,11 @@ from tests.common import ( async_get_device_automations, 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 diff --git a/tests/components/cover/test_device_trigger.py b/tests/components/cover/test_device_trigger.py index a9d5d2b6ee1..ef391707a9b 100644 --- a/tests/components/cover/test_device_trigger.py +++ b/tests/components/cover/test_device_trigger.py @@ -28,7 +28,11 @@ from tests.common import ( async_get_device_automations, 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 diff --git a/tests/components/deconz/test_device_trigger.py b/tests/components/deconz/test_device_trigger.py index d574d6d9647..2d87358ebb0 100644 --- a/tests/components/deconz/test_device_trigger.py +++ b/tests/components/deconz/test_device_trigger.py @@ -36,10 +36,14 @@ from tests.common import ( async_get_device_automations, async_mock_service, ) -from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401 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 def automation_calls(hass): """Track automation calls to a mock service.""" diff --git a/tests/components/default_config/test_init.py b/tests/components/default_config/test_init.py index 1f7c0820202..846cb3c40f6 100644 --- a/tests/components/default_config/test_init.py +++ b/tests/components/default_config/test_init.py @@ -7,7 +7,10 @@ from homeassistant.core import HomeAssistant from homeassistant.helpers import recorder as recorder_helper 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) diff --git a/tests/components/demo/conftest.py b/tests/components/demo/conftest.py index a6182289a86..6edcf495918 100644 --- a/tests/components/demo/conftest.py +++ b/tests/components/demo/conftest.py @@ -4,10 +4,14 @@ import pytest from homeassistant.core import HomeAssistant 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 +@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) async def setup_homeassistant(hass: HomeAssistant): """Set up the homeassistant integration.""" diff --git a/tests/components/device_automation/test_init.py b/tests/components/device_automation/test_init.py index 2fdea0a0bb1..8b082f26de4 100644 --- a/tests/components/device_automation/test_init.py +++ b/tests/components/device_automation/test_init.py @@ -28,10 +28,14 @@ from tests.common import ( mock_integration, mock_platform, ) -from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401 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 def fake_integration(hass): """Set up a mock integration with device automation support.""" diff --git a/tests/components/device_automation/test_toggle_entity.py b/tests/components/device_automation/test_toggle_entity.py index 6d89a59ee94..8f12a3fc5d2 100644 --- a/tests/components/device_automation/test_toggle_entity.py +++ b/tests/components/device_automation/test_toggle_entity.py @@ -10,7 +10,11 @@ from homeassistant.setup import async_setup_component import homeassistant.util.dt as dt_util 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 diff --git a/tests/components/device_tracker/test_device_condition.py b/tests/components/device_tracker/test_device_condition.py index 1ac6dfdeed9..2089722389d 100644 --- a/tests/components/device_tracker/test_device_condition.py +++ b/tests/components/device_tracker/test_device_condition.py @@ -16,7 +16,11 @@ from tests.common import ( async_get_device_automations, 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 diff --git a/tests/components/device_tracker/test_device_trigger.py b/tests/components/device_tracker/test_device_trigger.py index c99e2d4928e..517295774bf 100644 --- a/tests/components/device_tracker/test_device_trigger.py +++ b/tests/components/device_tracker/test_device_trigger.py @@ -22,7 +22,12 @@ from tests.common import ( async_get_device_automations, 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_LONGITUDE = -117.234758 diff --git a/tests/components/emulated_hue/conftest.py b/tests/components/emulated_hue/conftest.py index 8b47cca6d5d..652ca6536e3 100644 --- a/tests/components/emulated_hue/conftest.py +++ b/tests/components/emulated_hue/conftest.py @@ -1,3 +1,8 @@ """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.""" diff --git a/tests/components/fan/test_device_action.py b/tests/components/fan/test_device_action.py index fef3c4cc0e7..195eb932d7a 100644 --- a/tests/components/fan/test_device_action.py +++ b/tests/components/fan/test_device_action.py @@ -16,7 +16,11 @@ from tests.common import ( async_get_device_automations, 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( diff --git a/tests/components/fan/test_device_condition.py b/tests/components/fan/test_device_condition.py index 5f34850cd6a..516cdea1e6a 100644 --- a/tests/components/fan/test_device_condition.py +++ b/tests/components/fan/test_device_condition.py @@ -16,7 +16,11 @@ from tests.common import ( async_get_device_automations, 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 diff --git a/tests/components/fan/test_device_trigger.py b/tests/components/fan/test_device_trigger.py index 9f32a79bd31..cb2b557dcad 100644 --- a/tests/components/fan/test_device_trigger.py +++ b/tests/components/fan/test_device_trigger.py @@ -21,7 +21,11 @@ from tests.common import ( async_get_device_automations, 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 diff --git a/tests/components/geo_location/test_trigger.py b/tests/components/geo_location/test_trigger.py index ea5c051d4d2..8fcbc9d2f55 100644 --- a/tests/components/geo_location/test_trigger.py +++ b/tests/components/geo_location/test_trigger.py @@ -14,7 +14,11 @@ from homeassistant.core import Context, HomeAssistant from homeassistant.setup import async_setup_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 diff --git a/tests/components/homeassistant/triggers/conftest.py b/tests/components/homeassistant/triggers/conftest.py index 77520a1bf68..9f53537819b 100644 --- a/tests/components/homeassistant/triggers/conftest.py +++ b/tests/components/homeassistant/triggers/conftest.py @@ -1,3 +1,8 @@ """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.""" diff --git a/tests/components/homekit_controller/test_device_trigger.py b/tests/components/homekit_controller/test_device_trigger.py index 015d567ece7..580f46fb821 100644 --- a/tests/components/homekit_controller/test_device_trigger.py +++ b/tests/components/homekit_controller/test_device_trigger.py @@ -18,7 +18,11 @@ from tests.common import ( async_get_device_automations, 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 diff --git a/tests/components/humidifier/test_device_action.py b/tests/components/humidifier/test_device_action.py index 21957191836..1bcb09d4583 100644 --- a/tests/components/humidifier/test_device_action.py +++ b/tests/components/humidifier/test_device_action.py @@ -21,7 +21,11 @@ from tests.common import ( async_get_device_automations, 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( diff --git a/tests/components/humidifier/test_device_condition.py b/tests/components/humidifier/test_device_condition.py index db25bb04970..5671cce70e0 100644 --- a/tests/components/humidifier/test_device_condition.py +++ b/tests/components/humidifier/test_device_condition.py @@ -21,7 +21,11 @@ from tests.common import ( async_get_device_automations, 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 diff --git a/tests/components/humidifier/test_device_trigger.py b/tests/components/humidifier/test_device_trigger.py index 8c4d82e7bfb..72d1e8c9332 100644 --- a/tests/components/humidifier/test_device_trigger.py +++ b/tests/components/humidifier/test_device_trigger.py @@ -31,7 +31,11 @@ from tests.common import ( async_get_device_automations, 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 diff --git a/tests/components/kodi/test_device_trigger.py b/tests/components/kodi/test_device_trigger.py index 7278cb6680e..140a77839f9 100644 --- a/tests/components/kodi/test_device_trigger.py +++ b/tests/components/kodi/test_device_trigger.py @@ -16,7 +16,11 @@ from tests.common import ( async_get_device_automations, 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 diff --git a/tests/components/light/test_device_action.py b/tests/components/light/test_device_action.py index 5fd33ced82c..c37827f8f17 100644 --- a/tests/components/light/test_device_action.py +++ b/tests/components/light/test_device_action.py @@ -24,7 +24,11 @@ from tests.common import ( async_get_device_automations, 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 diff --git a/tests/components/light/test_device_condition.py b/tests/components/light/test_device_condition.py index 9b6e38359fd..5496f93d4b3 100644 --- a/tests/components/light/test_device_condition.py +++ b/tests/components/light/test_device_condition.py @@ -21,7 +21,11 @@ from tests.common import ( async_get_device_automations, 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 diff --git a/tests/components/light/test_device_trigger.py b/tests/components/light/test_device_trigger.py index 44a677a5da2..d65c7040761 100644 --- a/tests/components/light/test_device_trigger.py +++ b/tests/components/light/test_device_trigger.py @@ -21,7 +21,11 @@ from tests.common import ( async_get_device_automations, 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 diff --git a/tests/components/litejet/test_trigger.py b/tests/components/litejet/test_trigger.py index 40511c3f45b..d8042ea456c 100644 --- a/tests/components/litejet/test_trigger.py +++ b/tests/components/litejet/test_trigger.py @@ -14,7 +14,12 @@ import homeassistant.util.dt as dt_util from . import async_init_integration 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__) diff --git a/tests/components/lock/test_device_action.py b/tests/components/lock/test_device_action.py index 7619cc61fcf..56c6f82c6a8 100644 --- a/tests/components/lock/test_device_action.py +++ b/tests/components/lock/test_device_action.py @@ -16,7 +16,11 @@ from tests.common import ( async_get_device_automations, 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( diff --git a/tests/components/lock/test_device_condition.py b/tests/components/lock/test_device_condition.py index 4da8efecb56..9440636eebd 100644 --- a/tests/components/lock/test_device_condition.py +++ b/tests/components/lock/test_device_condition.py @@ -23,7 +23,11 @@ from tests.common import ( async_get_device_automations, 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 diff --git a/tests/components/lock/test_device_trigger.py b/tests/components/lock/test_device_trigger.py index 19191883a54..a761352492d 100644 --- a/tests/components/lock/test_device_trigger.py +++ b/tests/components/lock/test_device_trigger.py @@ -28,7 +28,11 @@ from tests.common import ( async_get_device_automations, 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 diff --git a/tests/components/logbook/conftest.py b/tests/components/logbook/conftest.py index 5b98d7240be..e2626047d99 100644 --- a/tests/components/logbook/conftest.py +++ b/tests/components/logbook/conftest.py @@ -1,3 +1,8 @@ """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.""" diff --git a/tests/components/media_player/test_device_condition.py b/tests/components/media_player/test_device_condition.py index d2e2c3db289..2bb8d52c75d 100644 --- a/tests/components/media_player/test_device_condition.py +++ b/tests/components/media_player/test_device_condition.py @@ -24,7 +24,11 @@ from tests.common import ( async_get_device_automations, 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 diff --git a/tests/components/media_player/test_device_trigger.py b/tests/components/media_player/test_device_trigger.py index cb25439955b..1a95fb87aba 100644 --- a/tests/components/media_player/test_device_trigger.py +++ b/tests/components/media_player/test_device_trigger.py @@ -29,7 +29,11 @@ from tests.common import ( async_get_device_automations, 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 diff --git a/tests/components/mqtt/conftest.py b/tests/components/mqtt/conftest.py index 9fe04c459fe..84861356e08 100644 --- a/tests/components/mqtt/conftest.py +++ b/tests/components/mqtt/conftest.py @@ -2,10 +2,14 @@ import pytest -from tests.components.blueprint.conftest import stub_blueprint_populate # 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) def patch_hass_config(mock_hass_config: None) -> None: """Patch configuration.yaml.""" diff --git a/tests/components/mqtt/test_device_trigger.py b/tests/components/mqtt/test_device_trigger.py index bcfd55488bc..e37e7c6cb87 100644 --- a/tests/components/mqtt/test_device_trigger.py +++ b/tests/components/mqtt/test_device_trigger.py @@ -22,10 +22,14 @@ from tests.common import ( async_get_device_automations, async_mock_service, ) -from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401 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 def calls(hass: HomeAssistant) -> list[ServiceCall]: """Track calls to a mock service.""" diff --git a/tests/components/mqtt/test_trigger.py b/tests/components/mqtt/test_trigger.py index 83868c3387c..675acf7750d 100644 --- a/tests/components/mqtt/test_trigger.py +++ b/tests/components/mqtt/test_trigger.py @@ -9,7 +9,11 @@ from homeassistant.core import HomeAssistant from homeassistant.setup import async_setup_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 diff --git a/tests/components/number/test_device_action.py b/tests/components/number/test_device_action.py index 987c1440948..7d6e4a8520c 100644 --- a/tests/components/number/test_device_action.py +++ b/tests/components/number/test_device_action.py @@ -21,7 +21,11 @@ from tests.common import ( async_get_device_automations, 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( diff --git a/tests/components/philips_js/test_device_trigger.py b/tests/components/philips_js/test_device_trigger.py index a0c2ed34c1e..ae492ade3ec 100644 --- a/tests/components/philips_js/test_device_trigger.py +++ b/tests/components/philips_js/test_device_trigger.py @@ -12,7 +12,11 @@ from tests.common import ( async_get_device_automations, 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 diff --git a/tests/components/remote/test_device_action.py b/tests/components/remote/test_device_action.py index 15ff75e02c0..13c6da5f778 100644 --- a/tests/components/remote/test_device_action.py +++ b/tests/components/remote/test_device_action.py @@ -16,7 +16,11 @@ from tests.common import ( async_get_device_automations, 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 diff --git a/tests/components/remote/test_device_condition.py b/tests/components/remote/test_device_condition.py index 30732c77fe3..ba6cc9fe4f4 100644 --- a/tests/components/remote/test_device_condition.py +++ b/tests/components/remote/test_device_condition.py @@ -21,7 +21,11 @@ from tests.common import ( async_get_device_automations, 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 diff --git a/tests/components/remote/test_device_trigger.py b/tests/components/remote/test_device_trigger.py index cd35073280a..2f39486a0fe 100644 --- a/tests/components/remote/test_device_trigger.py +++ b/tests/components/remote/test_device_trigger.py @@ -21,7 +21,11 @@ from tests.common import ( async_get_device_automations, 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 diff --git a/tests/components/script/conftest.py b/tests/components/script/conftest.py index 5b98d7240be..e2626047d99 100644 --- a/tests/components/script/conftest.py +++ b/tests/components/script/conftest.py @@ -1,3 +1,8 @@ """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.""" diff --git a/tests/components/search/test_init.py b/tests/components/search/test_init.py index 31de817c60f..e6f7d656f73 100644 --- a/tests/components/search/test_init.py +++ b/tests/components/search/test_init.py @@ -1,4 +1,6 @@ """Tests for Search integration.""" +import pytest + from homeassistant.components import search from homeassistant.core import HomeAssistant from homeassistant.helpers import ( @@ -10,9 +12,14 @@ from homeassistant.helpers import ( from homeassistant.setup import async_setup_component from tests.common import MockConfigEntry -from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401 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 = { "light.platform_config_source": { "source": entity.SOURCE_PLATFORM_CONFIG, diff --git a/tests/components/sensor/test_device_condition.py b/tests/components/sensor/test_device_condition.py index 5e93bf2a64c..90479927d57 100644 --- a/tests/components/sensor/test_device_condition.py +++ b/tests/components/sensor/test_device_condition.py @@ -26,10 +26,14 @@ from tests.common import ( async_get_device_automations, 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 +@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 def calls(hass: HomeAssistant) -> list[ServiceCall]: """Track calls to a mock service.""" diff --git a/tests/components/sensor/test_device_trigger.py b/tests/components/sensor/test_device_trigger.py index 37f44a5b40d..e360117987c 100644 --- a/tests/components/sensor/test_device_trigger.py +++ b/tests/components/sensor/test_device_trigger.py @@ -30,10 +30,14 @@ from tests.common import ( async_get_device_automations, 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 +@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 def calls(hass: HomeAssistant) -> list[ServiceCall]: """Track calls to a mock service.""" diff --git a/tests/components/sun/test_trigger.py b/tests/components/sun/test_trigger.py index 08910010d5f..988e069ac5f 100644 --- a/tests/components/sun/test_trigger.py +++ b/tests/components/sun/test_trigger.py @@ -19,7 +19,11 @@ from homeassistant.setup import async_setup_component import homeassistant.util.dt as dt_util 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 diff --git a/tests/components/switch/test_device_action.py b/tests/components/switch/test_device_action.py index a52474fe030..fbdd2716fca 100644 --- a/tests/components/switch/test_device_action.py +++ b/tests/components/switch/test_device_action.py @@ -16,7 +16,11 @@ from tests.common import ( async_get_device_automations, 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 diff --git a/tests/components/switch/test_device_condition.py b/tests/components/switch/test_device_condition.py index e15074b1f31..08e4487750d 100644 --- a/tests/components/switch/test_device_condition.py +++ b/tests/components/switch/test_device_condition.py @@ -21,7 +21,11 @@ from tests.common import ( async_get_device_automations, 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 diff --git a/tests/components/switch/test_device_trigger.py b/tests/components/switch/test_device_trigger.py index 8d55149648a..c971a9011c9 100644 --- a/tests/components/switch/test_device_trigger.py +++ b/tests/components/switch/test_device_trigger.py @@ -21,7 +21,11 @@ from tests.common import ( async_get_device_automations, 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 diff --git a/tests/components/tag/test_trigger.py b/tests/components/tag/test_trigger.py index 5fe0664f5d9..12c072b8f2b 100644 --- a/tests/components/tag/test_trigger.py +++ b/tests/components/tag/test_trigger.py @@ -9,7 +9,11 @@ from homeassistant.core import HomeAssistant from homeassistant.setup import async_setup_component 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 diff --git a/tests/components/tasmota/test_device_trigger.py b/tests/components/tasmota/test_device_trigger.py index c999e6c0683..05e31daa441 100644 --- a/tests/components/tasmota/test_device_trigger.py +++ b/tests/components/tasmota/test_device_trigger.py @@ -22,10 +22,14 @@ from tests.common import ( async_fire_mqtt_message, async_get_device_automations, ) -from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401 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( hass: HomeAssistant, device_reg, diff --git a/tests/components/text/test_device_action.py b/tests/components/text/test_device_action.py index d3e50103e70..bcc35cd66d4 100644 --- a/tests/components/text/test_device_action.py +++ b/tests/components/text/test_device_action.py @@ -21,7 +21,11 @@ from tests.common import ( async_get_device_automations, 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( diff --git a/tests/components/trace/conftest.py b/tests/components/trace/conftest.py index f84f60e38fb..d5f8dece98f 100644 --- a/tests/components/trace/conftest.py +++ b/tests/components/trace/conftest.py @@ -1,3 +1,8 @@ """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.""" diff --git a/tests/components/update/test_device_trigger.py b/tests/components/update/test_device_trigger.py index 9f55e85dbe9..768d3efede1 100644 --- a/tests/components/update/test_device_trigger.py +++ b/tests/components/update/test_device_trigger.py @@ -20,7 +20,11 @@ from tests.common import ( async_get_device_automations, 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 diff --git a/tests/components/vacuum/test_device_action.py b/tests/components/vacuum/test_device_action.py index 82ebab62155..b4bef23e938 100644 --- a/tests/components/vacuum/test_device_action.py +++ b/tests/components/vacuum/test_device_action.py @@ -16,7 +16,11 @@ from tests.common import ( async_get_device_automations, 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( diff --git a/tests/components/vacuum/test_device_condition.py b/tests/components/vacuum/test_device_condition.py index 51715fec52f..ec73ac441b7 100644 --- a/tests/components/vacuum/test_device_condition.py +++ b/tests/components/vacuum/test_device_condition.py @@ -21,7 +21,11 @@ from tests.common import ( async_get_device_automations, 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 diff --git a/tests/components/vacuum/test_device_trigger.py b/tests/components/vacuum/test_device_trigger.py index a9cd377b6eb..62ced757c03 100644 --- a/tests/components/vacuum/test_device_trigger.py +++ b/tests/components/vacuum/test_device_trigger.py @@ -21,7 +21,11 @@ from tests.common import ( async_get_device_automations, 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 diff --git a/tests/components/water_heater/test_device_action.py b/tests/components/water_heater/test_device_action.py index ecf719fdc41..65b04b33351 100644 --- a/tests/components/water_heater/test_device_action.py +++ b/tests/components/water_heater/test_device_action.py @@ -16,7 +16,11 @@ from tests.common import ( async_get_device_automations, 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( diff --git a/tests/components/webhook/test_trigger.py b/tests/components/webhook/test_trigger.py index a10b77eb105..2848a3fb759 100644 --- a/tests/components/webhook/test_trigger.py +++ b/tests/components/webhook/test_trigger.py @@ -7,10 +7,14 @@ import pytest from homeassistant.core import HomeAssistant, callback from homeassistant.setup import async_setup_component -from tests.components.blueprint.conftest import stub_blueprint_populate # noqa: F401 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) async def setup_http(hass): """Set up http.""" diff --git a/tests/components/zha/test_device_action.py b/tests/components/zha/test_device_action.py index 6db138ebcde..6566a309335 100644 --- a/tests/components/zha/test_device_action.py +++ b/tests/components/zha/test_device_action.py @@ -24,7 +24,12 @@ from tests.common import ( async_mock_service, 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" COMMAND = "command" diff --git a/tests/components/zha/test_device_trigger.py b/tests/components/zha/test_device_trigger.py index 29920eab836..3538ba44c55 100644 --- a/tests/components/zha/test_device_trigger.py +++ b/tests/components/zha/test_device_trigger.py @@ -24,7 +24,12 @@ from tests.common import ( async_get_device_automations, 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 OFF = 0 diff --git a/tests/components/zone/test_trigger.py b/tests/components/zone/test_trigger.py index 6a7e07cc998..c359136ac08 100644 --- a/tests/components/zone/test_trigger.py +++ b/tests/components/zone/test_trigger.py @@ -8,7 +8,11 @@ from homeassistant.helpers import entity_registry as er from homeassistant.setup import async_setup_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