Add type hints to integration tests (d-e) (#87699)

This commit is contained in:
epenet 2023-02-08 13:01:44 +01:00 committed by GitHub
parent 5e214f2e43
commit 3052de3e8e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
81 changed files with 765 additions and 450 deletions

View file

@ -5,13 +5,14 @@ from pydexcom import AccountError, SessionError
from homeassistant.components.dexcom.const import DOMAIN
from homeassistant.config_entries import ConfigEntryState
from homeassistant.core import HomeAssistant
from . import CONFIG, init_integration
from tests.common import MockConfigEntry
async def test_setup_entry_account_error(hass):
async def test_setup_entry_account_error(hass: HomeAssistant) -> None:
"""Test entry setup failed due to account error."""
entry = MockConfigEntry(
domain=DOMAIN,
@ -31,7 +32,7 @@ async def test_setup_entry_account_error(hass):
assert result is False
async def test_setup_entry_session_error(hass):
async def test_setup_entry_session_error(hass: HomeAssistant) -> None:
"""Test entry setup failed due to session error."""
entry = MockConfigEntry(
domain=DOMAIN,
@ -51,7 +52,7 @@ async def test_setup_entry_session_error(hass):
assert result is False
async def test_unload_entry(hass):
async def test_unload_entry(hass: HomeAssistant) -> None:
"""Test successful unload of entry."""
entry = await init_integration(hass)