Skip to content

Commit

Permalink
Add auto_enable_custom_integrations
Browse files Browse the repository at this point in the history
  • Loading branch information
Limych committed Jan 8, 2022
1 parent a797946 commit 6bea278
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@
pytest_plugins = "pytest_homeassistant_custom_component" # pylint: disable=invalid-name


# 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):
"""Automatically enable loading custom integrations in all tests."""
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.
Expand Down

0 comments on commit 6bea278

Please sign in to comment.