Add typing to tests with single hass argument (2) (#87675)

* Add typing to tests with single hass argument (2)

* a few more
This commit is contained in:
epenet 2023-02-08 08:51:43 +01:00 committed by GitHub
parent 1bbc03d0ba
commit c98b4e3204
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
50 changed files with 816 additions and 671 deletions

View file

@ -1,6 +1,7 @@
"""Test integration platform helpers."""
from unittest.mock import Mock
from homeassistant.core import HomeAssistant
from homeassistant.helpers.integration_platform import (
async_process_integration_platform_for_component,
async_process_integration_platforms,
@ -10,7 +11,7 @@ from homeassistant.setup import ATTR_COMPONENT, EVENT_COMPONENT_LOADED
from tests.common import mock_platform
async def test_process_integration_platforms(hass):
async def test_process_integration_platforms(hass: HomeAssistant) -> None:
"""Test processing integrations."""
loaded_platform = Mock()
mock_platform(hass, "loaded.platform_to_check", loaded_platform)
@ -45,7 +46,7 @@ async def test_process_integration_platforms(hass):
assert len(processed) == 2
async def test_process_integration_platforms_none_loaded(hass):
async def test_process_integration_platforms_none_loaded(hass: HomeAssistant) -> None:
"""Test processing integrations with none loaded."""
# Verify we can call async_process_integration_platform_for_component
# when there are none loaded and it does not throw