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

@ -1,11 +1,11 @@
"""deCONZ button platform tests."""
from unittest.mock import patch
import pytest
from homeassistant.components.button import DOMAIN as BUTTON_DOMAIN, SERVICE_PRESS
from homeassistant.const import ATTR_ENTITY_ID, STATE_UNAVAILABLE
from homeassistant.core import HomeAssistant
from homeassistant.helpers import device_registry as dr, entity_registry as er
from homeassistant.helpers.entity import EntityCategory
@ -15,8 +15,12 @@ from .test_gateway import (
setup_deconz_integration,
)
from tests.test_util.aiohttp import AiohttpClientMocker
async def test_no_binary_sensors(hass, aioclient_mock):
async def test_no_binary_sensors(
hass: HomeAssistant, aioclient_mock: AiohttpClientMocker
) -> None:
"""Test that no sensors in deconz results in no sensor entities."""
await setup_deconz_integration(hass, aioclient_mock)
assert len(hass.states.async_all()) == 0