mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
Improve type hints in axis tests (#119260)
* Improve type hints in axis tests * A couple more * One more * Improve light * Improve hub * Improve config-flow
This commit is contained in:
@@ -9,7 +9,6 @@ import pytest
|
||||
import respx
|
||||
|
||||
from homeassistant.components.light import ATTR_BRIGHTNESS, DOMAIN as LIGHT_DOMAIN
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import (
|
||||
ATTR_ENTITY_ID,
|
||||
SERVICE_TURN_OFF,
|
||||
@@ -70,9 +69,9 @@ def light_control_fixture(light_control_items: list[dict[str, Any]]) -> None:
|
||||
|
||||
@pytest.mark.parametrize("api_discovery_items", [API_DISCOVERY_LIGHT_CONTROL])
|
||||
@pytest.mark.parametrize("light_control_items", [[]])
|
||||
@pytest.mark.usefixtures("setup_config_entry")
|
||||
async def test_no_light_entity_without_light_control_representation(
|
||||
hass: HomeAssistant,
|
||||
setup_config_entry: ConfigEntry,
|
||||
mock_rtsp_event: Callable[[str, str, str, str, str, str], None],
|
||||
) -> None:
|
||||
"""Verify no lights entities get created without light control representation."""
|
||||
@@ -89,12 +88,10 @@ async def test_no_light_entity_without_light_control_representation(
|
||||
|
||||
|
||||
@pytest.mark.parametrize("api_discovery_items", [API_DISCOVERY_LIGHT_CONTROL])
|
||||
@pytest.mark.usefixtures("setup_config_entry")
|
||||
async def test_lights(
|
||||
hass: HomeAssistant,
|
||||
respx_mock: respx,
|
||||
setup_config_entry: ConfigEntry,
|
||||
mock_rtsp_event: Callable[[str, str, str, str, str, str], None],
|
||||
api_discovery_items: dict[str, Any],
|
||||
) -> None:
|
||||
"""Test that lights are loaded properly."""
|
||||
# Add light
|
||||
|
||||
Reference in New Issue
Block a user