Use enable_custom_integrations fixture by default (#58)

This commit is contained in:
MatthewFlamm 2021-05-31 03:33:44 -04:00 committed by GitHub
parent a11ab703b1
commit cb91d2f547
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -1 +1 @@
pytest-homeassistant-custom-component==0.3.0 pytest-homeassistant-custom-component==0.4.0

View File

@ -21,6 +21,13 @@ import pytest
pytest_plugins = "pytest_homeassistant_custom_component" 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 # 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 # notifications. These calls would fail without this fixture since the persistent_notification
# integration is never loaded during a test. # integration is never loaded during a test.