Improve typing for calls fixture in tests (m-z) (#118350)

* Improve typing for `calls` fixture in tests (m-z)

* More

* More
This commit is contained in:
epenet 2024-05-29 09:30:41 +02:00 committed by GitHub
parent 0c38aa56f5
commit 98d24dd276
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
45 changed files with 433 additions and 250 deletions

View file

@ -7,7 +7,7 @@ from yolink.const import ATTR_DEVICE_DIMMER, ATTR_DEVICE_SMART_REMOTER
from homeassistant.components import automation
from homeassistant.components.device_automation import DeviceAutomationType
from homeassistant.components.yolink import DOMAIN, YOLINK_EVENT
from homeassistant.core import HomeAssistant
from homeassistant.core import HomeAssistant, ServiceCall
from homeassistant.helpers import device_registry as dr
from homeassistant.setup import async_setup_component
@ -19,7 +19,7 @@ from tests.common import (
@pytest.fixture
def calls(hass: HomeAssistant):
def calls(hass: HomeAssistant) -> list[ServiceCall]:
"""Track calls to a mock service."""
return async_mock_service(hass, "yolink", "automation")
@ -120,7 +120,7 @@ async def test_get_triggers_exception(
async def test_if_fires_on_event(
hass: HomeAssistant, calls, device_registry: dr.DeviceRegistry
hass: HomeAssistant, calls: list[ServiceCall], device_registry: dr.DeviceRegistry
) -> None:
"""Test for event triggers firing."""
mac_address = "12:34:56:AB:CD:EF"