diff --git a/requirements_test.txt b/requirements_test.txt index 1519e80..ee5e049 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -1 +1 @@ -pytest-homeassistant-custom-component==0.3.0 +pytest-homeassistant-custom-component==0.4.0 diff --git a/tests/conftest.py b/tests/conftest.py index 8fb21db..f7835f6 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -21,6 +21,13 @@ import pytest pytest_plugins = "pytest_homeassistant_custom_component" +# This fixture enables loading custom integrations in all tests. +# Remove to enable selective use of this fixture +@pytest.fixture(autouse=True) +def auto_enable_custom_integrations(enable_custom_integrations): + yield + + # This fixture is used to prevent HomeAssistant from attempting to create and dismiss persistent # notifications. These calls would fail without this fixture since the persistent_notification # integration is never loaded during a test.