Add type hints to integration tests (part 21) (#88233)

This commit is contained in:
epenet 2023-02-16 11:15:26 +01:00 committed by GitHub
parent 0748e12341
commit dab8557951
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
49 changed files with 536 additions and 328 deletions

View file

@ -6,6 +6,7 @@ import pytest
from homeassistant import config_entries, data_entry_flow
from homeassistant.components.spider.const import DOMAIN
from homeassistant.const import CONF_PASSWORD, CONF_USERNAME
from homeassistant.core import HomeAssistant
from tests.common import MockConfigEntry
@ -25,7 +26,7 @@ def spider_fixture() -> Mock:
yield spider
async def test_user(hass, spider):
async def test_user(hass: HomeAssistant, spider) -> None:
"""Test user config."""
result = await hass.config_entries.flow.async_init(
@ -55,7 +56,7 @@ async def test_user(hass, spider):
assert len(mock_setup_entry.mock_calls) == 1
async def test_import(hass, spider):
async def test_import(hass: HomeAssistant, spider) -> None:
"""Test import step."""
with patch(
@ -82,7 +83,7 @@ async def test_import(hass, spider):
assert len(mock_setup_entry.mock_calls) == 1
async def test_abort_if_already_setup(hass, spider):
async def test_abort_if_already_setup(hass: HomeAssistant, spider) -> None:
"""Test we abort if Spider is already setup."""
MockConfigEntry(domain=DOMAIN, data=SPIDER_USER_DATA).add_to_hass(hass)