Add type hints to integration tests (part 4) (#87848)

This commit is contained in:
epenet 2023-02-11 08:26:13 +01:00 committed by GitHub
parent a385a00d08
commit 9f688a564f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
52 changed files with 733 additions and 336 deletions

View file

@ -6,6 +6,8 @@ import pytest
from homeassistant.components import stt
from homeassistant.setup import async_setup_component
from tests.typing import ClientSessionGenerator
@pytest.fixture(autouse=True)
async def setup_comp(hass):
@ -14,7 +16,7 @@ async def setup_comp(hass):
await hass.async_block_till_done()
async def test_demo_settings(hass_client):
async def test_demo_settings(hass_client: ClientSessionGenerator) -> None:
"""Test retrieve settings from demo provider."""
client = await hass_client()
@ -32,7 +34,7 @@ async def test_demo_settings(hass_client):
}
async def test_demo_speech_no_metadata(hass_client):
async def test_demo_speech_no_metadata(hass_client: ClientSessionGenerator) -> None:
"""Test retrieve settings from demo provider."""
client = await hass_client()
@ -40,7 +42,7 @@ async def test_demo_speech_no_metadata(hass_client):
assert response.status == HTTPStatus.BAD_REQUEST
async def test_demo_speech_wrong_metadata(hass_client):
async def test_demo_speech_wrong_metadata(hass_client: ClientSessionGenerator) -> None:
"""Test retrieve settings from demo provider."""
client = await hass_client()
@ -57,7 +59,7 @@ async def test_demo_speech_wrong_metadata(hass_client):
assert response.status == HTTPStatus.UNSUPPORTED_MEDIA_TYPE
async def test_demo_speech(hass_client):
async def test_demo_speech(hass_client: ClientSessionGenerator) -> None:
"""Test retrieve settings from demo provider."""
client = await hass_client()