1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

Add type hints to integration tests (part 7) (#87980)

This commit is contained in:
epenet
2023-02-13 09:53:09 +01:00
committed by GitHub
parent b9beed4624
commit b68f502769
51 changed files with 755 additions and 395 deletions

View File

@@ -3,11 +3,15 @@ import pytest
from homeassistant.components.diagnostics import REDACTED
from homeassistant.components.generic.diagnostics import redact_url
from homeassistant.core import HomeAssistant
from tests.components.diagnostics import get_diagnostics_for_config_entry
from tests.typing import ClientSessionGenerator
async def test_entry_diagnostics(hass, hass_client, setup_entry):
async def test_entry_diagnostics(
hass: HomeAssistant, hass_client: ClientSessionGenerator, setup_entry
) -> None:
"""Test config entry diagnostics."""
assert await get_diagnostics_for_config_entry(hass, hass_client, setup_entry) == {
@@ -52,7 +56,7 @@ async def test_entry_diagnostics(hass, hass_client, setup_entry):
),
],
)
def test_redact_url(url_in, url_out_expected):
def test_redact_url(url_in, url_out_expected) -> None:
"""Test url redaction."""
url_out = redact_url(url_in)
assert url_out == url_out_expected