Add type hints to integration tests (part 8) (#87982)
This commit is contained in:
parent
575f7c4205
commit
89e4ee5320
50 changed files with 696 additions and 339 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue