Add type hints to integration tests (t-z) (#87707)

This commit is contained in:
epenet 2023-02-08 19:10:53 +01:00 committed by GitHub
parent f75ac17554
commit 278050a73f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
110 changed files with 961 additions and 606 deletions

View file

@ -1,5 +1,4 @@
"""Tests for the UpCloud config flow."""
from unittest.mock import patch
import requests.exceptions
@ -9,6 +8,7 @@ from upcloud_api import UpCloudAPIError
from homeassistant import config_entries, data_entry_flow
from homeassistant.components.upcloud.const import DOMAIN
from homeassistant.const import CONF_PASSWORD, CONF_SCAN_INTERVAL, CONF_USERNAME
from homeassistant.core import HomeAssistant
from tests.common import MockConfigEntry
@ -22,7 +22,7 @@ FIXTURE_USER_INPUT_OPTIONS = {
}
async def test_show_set_form(hass):
async def test_show_set_form(hass: HomeAssistant) -> None:
"""Test that the setup form is served."""
result = await hass.config_entries.flow.async_init(
DOMAIN, context={"source": config_entries.SOURCE_USER}, data=None
@ -75,7 +75,7 @@ async def test_success(hass, requests_mock):
assert result["data"][CONF_PASSWORD] == FIXTURE_USER_INPUT[CONF_PASSWORD]
async def test_options(hass):
async def test_options(hass: HomeAssistant) -> None:
"""Test options produce expected data."""
config_entry = MockConfigEntry(