Add type hints to integration tests (part 23) (#88235)
This commit is contained in:
parent
aa50096a31
commit
9a5f88f55f
49 changed files with 651 additions and 408 deletions
|
@ -112,7 +112,9 @@ async def test_no_clients(
|
|||
assert len(hass.states.async_entity_ids(SENSOR_DOMAIN)) == 0
|
||||
|
||||
|
||||
async def test_bandwidth_sensors(hass, aioclient_mock, mock_unifi_websocket):
|
||||
async def test_bandwidth_sensors(
|
||||
hass: HomeAssistant, aioclient_mock: AiohttpClientMocker, mock_unifi_websocket
|
||||
) -> None:
|
||||
"""Verify that bandwidth sensors are working as expected."""
|
||||
wired_client = {
|
||||
"hostname": "Wired client",
|
||||
|
@ -192,14 +194,14 @@ async def test_bandwidth_sensors(hass, aioclient_mock, mock_unifi_websocket):
|
|||
],
|
||||
)
|
||||
async def test_uptime_sensors(
|
||||
hass,
|
||||
aioclient_mock,
|
||||
hass: HomeAssistant,
|
||||
aioclient_mock: AiohttpClientMocker,
|
||||
mock_unifi_websocket,
|
||||
entity_registry_enabled_by_default,
|
||||
initial_uptime,
|
||||
event_uptime,
|
||||
new_uptime,
|
||||
):
|
||||
) -> None:
|
||||
"""Verify that uptime sensors are working as expected."""
|
||||
uptime_client = {
|
||||
"mac": "00:00:00:00:00:01",
|
||||
|
@ -267,8 +269,11 @@ async def test_uptime_sensors(
|
|||
|
||||
|
||||
async def test_remove_sensors(
|
||||
hass, aioclient_mock, mock_unifi_websocket, entity_registry_enabled_by_default
|
||||
):
|
||||
hass: HomeAssistant,
|
||||
aioclient_mock: AiohttpClientMocker,
|
||||
mock_unifi_websocket,
|
||||
entity_registry_enabled_by_default,
|
||||
) -> None:
|
||||
"""Verify removing of clients work as expected."""
|
||||
wired_client = {
|
||||
"hostname": "Wired client",
|
||||
|
@ -325,7 +330,9 @@ async def test_remove_sensors(
|
|||
assert hass.states.get("sensor.wireless_client_uptime")
|
||||
|
||||
|
||||
async def test_poe_port_switches(hass, aioclient_mock, mock_unifi_websocket):
|
||||
async def test_poe_port_switches(
|
||||
hass: HomeAssistant, aioclient_mock: AiohttpClientMocker, mock_unifi_websocket
|
||||
) -> None:
|
||||
"""Test the update_items function with some clients."""
|
||||
await setup_unifi_integration(hass, aioclient_mock, devices_response=[DEVICE_1])
|
||||
assert len(hass.states.async_entity_ids(SENSOR_DOMAIN)) == 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue