mirror of
https://github.com/home-assistant/core.git
synced 2025-11-09 02:49:40 +00:00
Use service_calls fixture in hue tests (#120928)
This commit is contained in:
@@ -16,17 +16,11 @@ from homeassistant.components import hue
|
||||
from homeassistant.components.hue.v1 import sensor_base as hue_sensor_base
|
||||
from homeassistant.components.hue.v2.device import async_setup_devices
|
||||
from homeassistant.config_entries import ConfigEntryState
|
||||
from homeassistant.core import HomeAssistant, ServiceCall
|
||||
from homeassistant.setup import async_setup_component
|
||||
|
||||
from .const import FAKE_BRIDGE, FAKE_BRIDGE_DEVICE
|
||||
|
||||
from tests.common import (
|
||||
MockConfigEntry,
|
||||
async_mock_service,
|
||||
load_fixture,
|
||||
mock_device_registry,
|
||||
)
|
||||
from tests.common import MockConfigEntry, load_fixture, mock_device_registry
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
@@ -288,9 +282,3 @@ async def setup_platform(
|
||||
def get_device_reg(hass):
|
||||
"""Return an empty, loaded, registry."""
|
||||
return mock_device_registry(hass)
|
||||
|
||||
|
||||
@pytest.fixture(name="calls")
|
||||
def track_calls(hass: HomeAssistant) -> list[ServiceCall]:
|
||||
"""Track calls to a mock service."""
|
||||
return async_mock_service(hass, "test", "automation")
|
||||
|
||||
Reference in New Issue
Block a user