Add type hints to integration tests (part 8) (#87982)

This commit is contained in:
epenet 2023-02-13 11:13:48 +01:00 committed by GitHub
parent 575f7c4205
commit 89e4ee5320
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
50 changed files with 696 additions and 339 deletions

View file

@ -1,15 +1,16 @@
"""The tests for the hassio sensors."""
import os
from unittest.mock import patch
import pytest
from homeassistant.components.hassio import DOMAIN
from homeassistant.core import HomeAssistant
from homeassistant.helpers import entity_registry
from homeassistant.setup import async_setup_component
from tests.common import MockConfigEntry
from tests.test_util.aiohttp import AiohttpClientMocker
MOCK_ENVIRON = {"SUPERVISOR": "127.0.0.1", "SUPERVISOR_TOKEN": "abcdefgh"}
@ -156,7 +157,9 @@ def mock_all(aioclient_mock, request):
("sensor.test2_memory_percent", "unavailable"),
],
)
async def test_sensor(hass, entity_id, expected, aioclient_mock):
async def test_sensor(
hass: HomeAssistant, entity_id, expected, aioclient_mock: AiohttpClientMocker
) -> None:
"""Test hassio OS and addons sensor."""
config_entry = MockConfigEntry(domain=DOMAIN, data={}, unique_id=DOMAIN)
config_entry.add_to_hass(hass)