Skip to content

Commit

Permalink
Use common fixtures in tasmota tests (home-assistant#121000)
Browse files Browse the repository at this point in the history
  • Loading branch information
epenet authored Jul 2, 2024
1 parent 195f07a commit 592ef59
Show file tree
Hide file tree
Showing 4 changed files with 173 additions and 208 deletions.
26 changes: 1 addition & 25 deletions tests/components/tasmota/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,35 +10,11 @@
DEFAULT_PREFIX,
DOMAIN,
)
from homeassistant.core import HomeAssistant, ServiceCall

from tests.common import (
MockConfigEntry,
async_mock_service,
mock_device_registry,
mock_registry,
)
from tests.common import MockConfigEntry
from tests.components.light.conftest import mock_light_profiles # noqa: F401


@pytest.fixture
def device_reg(hass):
"""Return an empty, loaded, registry."""
return mock_device_registry(hass)


@pytest.fixture
def entity_reg(hass):
"""Return an empty, loaded, registry."""
return mock_registry(hass)


@pytest.fixture
def calls(hass: HomeAssistant) -> list[ServiceCall]:
"""Track calls to a mock service."""
return async_mock_service(hass, "test", "automation")


@pytest.fixture(autouse=True)
def disable_debounce():
"""Set MQTT debounce timer to zero."""
Expand Down
Loading

0 comments on commit 592ef59

Please sign in to comment.