Add type hints to integration tests (part 4) (#87848)
This commit is contained in:
parent
a385a00d08
commit
9f688a564f
52 changed files with 733 additions and 336 deletions
|
@ -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()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue