Add type hints to integration tests (d-e) (#87699)
This commit is contained in:
parent
5e214f2e43
commit
3052de3e8e
81 changed files with 765 additions and 450 deletions
|
@ -1,5 +1,4 @@
|
|||
"""deCONZ cover platform tests."""
|
||||
|
||||
from unittest.mock import patch
|
||||
|
||||
from homeassistant.components.cover import (
|
||||
|
@ -23,6 +22,7 @@ from homeassistant.const import (
|
|||
STATE_OPEN,
|
||||
STATE_UNAVAILABLE,
|
||||
)
|
||||
from homeassistant.core import HomeAssistant
|
||||
|
||||
from .test_gateway import (
|
||||
DECONZ_WEB_REQUEST,
|
||||
|
@ -30,8 +30,12 @@ from .test_gateway import (
|
|||
setup_deconz_integration,
|
||||
)
|
||||
|
||||
from tests.test_util.aiohttp import AiohttpClientMocker
|
||||
|
||||
async def test_no_covers(hass, aioclient_mock):
|
||||
|
||||
async def test_no_covers(
|
||||
hass: HomeAssistant, aioclient_mock: AiohttpClientMocker
|
||||
) -> None:
|
||||
"""Test that no cover entities are created."""
|
||||
await setup_deconz_integration(hass, aioclient_mock)
|
||||
assert len(hass.states.async_all()) == 0
|
||||
|
@ -137,7 +141,9 @@ async def test_cover(hass, aioclient_mock, mock_deconz_websocket):
|
|||
assert len(hass.states.async_all()) == 0
|
||||
|
||||
|
||||
async def test_tilt_cover(hass, aioclient_mock):
|
||||
async def test_tilt_cover(
|
||||
hass: HomeAssistant, aioclient_mock: AiohttpClientMocker
|
||||
) -> None:
|
||||
"""Test that tilting a cover works."""
|
||||
data = {
|
||||
"lights": {
|
||||
|
@ -215,7 +221,9 @@ async def test_tilt_cover(hass, aioclient_mock):
|
|||
assert aioclient_mock.mock_calls[4][2] == {"stop": True}
|
||||
|
||||
|
||||
async def test_level_controllable_output_cover(hass, aioclient_mock):
|
||||
async def test_level_controllable_output_cover(
|
||||
hass: HomeAssistant, aioclient_mock: AiohttpClientMocker
|
||||
) -> None:
|
||||
"""Test that tilting a cover works."""
|
||||
data = {
|
||||
"lights": {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue