1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-25 05:26:47 +00:00

Add type hints to integration tests (part 2) (#87789)

* Add type hints to integration tests (part 2)

* typo

* Improve analytics

* Improve automation

* Imrpove bluetooth
This commit is contained in:
epenet
2023-02-10 16:05:26 +01:00
committed by GitHub
parent fa7acb4f0d
commit 0cf5e9fb4a
54 changed files with 1075 additions and 676 deletions

View File

@@ -66,7 +66,7 @@ async def test_platform_manually_configured(hass: HomeAssistant) -> None:
assert AXIS_DOMAIN not in hass.data
async def test_no_lights(hass, setup_config_entry):
async def test_no_lights(hass: HomeAssistant, setup_config_entry) -> None:
"""Test that no light events in Axis results in no light entities."""
assert not hass.states.async_entity_ids(LIGHT_DOMAIN)
@@ -74,8 +74,8 @@ async def test_no_lights(hass, setup_config_entry):
@pytest.mark.parametrize("api_discovery_items", [API_DISCOVERY_LIGHT_CONTROL])
@pytest.mark.parametrize("light_control_items", [[]])
async def test_no_light_entity_without_light_control_representation(
hass, setup_config_entry, mock_rtsp_event
):
hass: HomeAssistant, setup_config_entry, mock_rtsp_event
) -> None:
"""Verify no lights entities get created without light control representation."""
mock_rtsp_event(
topic="tns1:Device/tnsaxis:Light/Status",
@@ -90,7 +90,7 @@ async def test_no_light_entity_without_light_control_representation(
@pytest.mark.parametrize("api_discovery_items", [API_DISCOVERY_LIGHT_CONTROL])
async def test_lights(hass, setup_config_entry, mock_rtsp_event):
async def test_lights(hass: HomeAssistant, setup_config_entry, mock_rtsp_event) -> None:
"""Test that lights are loaded properly."""
# Add light
with patch(