Add missing type hints to tests (#90218)

* Add type hints to tests

* Revert gree as handled in #90222
This commit is contained in:
epenet 2023-03-25 03:34:01 +01:00 committed by GitHub
parent 7f1fff12ef
commit 5f3868b141
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 13 deletions

View file

@ -7,6 +7,7 @@ import zigpy.state
from homeassistant.components import zha
from homeassistant.components.zha import api
from homeassistant.components.zha.core.const import RadioType
from homeassistant.core import HomeAssistant
@pytest.fixture(autouse=True)
@ -16,7 +17,9 @@ def required_platform_only():
yield
async def test_async_get_network_settings_active(hass, setup_zha):
async def test_async_get_network_settings_active(
hass: HomeAssistant, setup_zha
) -> None:
"""Test reading settings with an active ZHA installation."""
await setup_zha()
@ -25,8 +28,8 @@ async def test_async_get_network_settings_active(hass, setup_zha):
async def test_async_get_network_settings_inactive(
hass, setup_zha, zigpy_app_controller
):
hass: HomeAssistant, setup_zha, zigpy_app_controller
) -> None:
"""Test reading settings with an inactive ZHA installation."""
await setup_zha()
@ -48,8 +51,8 @@ async def test_async_get_network_settings_inactive(
async def test_async_get_network_settings_missing(
hass, setup_zha, zigpy_app_controller
):
hass: HomeAssistant, setup_zha, zigpy_app_controller
) -> None:
"""Test reading settings with an inactive ZHA installation, no valid channel."""
await setup_zha()
@ -69,13 +72,13 @@ async def test_async_get_network_settings_missing(
assert settings is None
async def test_async_get_network_settings_failure(hass):
async def test_async_get_network_settings_failure(hass: HomeAssistant) -> None:
"""Test reading settings with no ZHA config entries and no database."""
with pytest.raises(ValueError):
await api.async_get_network_settings(hass)
async def test_async_get_radio_type_active(hass, setup_zha):
async def test_async_get_radio_type_active(hass: HomeAssistant, setup_zha) -> None:
"""Test reading the radio type with an active ZHA installation."""
await setup_zha()
@ -83,7 +86,7 @@ async def test_async_get_radio_type_active(hass, setup_zha):
assert radio_type == RadioType.ezsp
async def test_async_get_radio_path_active(hass, setup_zha):
async def test_async_get_radio_path_active(hass: HomeAssistant, setup_zha) -> None:
"""Test reading the radio path with an active ZHA installation."""
await setup_zha()