1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-25 05:26:47 +00:00

Adjust pylint plugin for components fixtures (#90217)

* Adjust pylint plugin for components fixtures

* Adjust components

* Use MagicMock

* Adjust

* Use None
This commit is contained in:
epenet
2023-03-26 15:21:19 +02:00
committed by GitHub
parent e0ec3488d3
commit 69a46d4002
21 changed files with 59 additions and 59 deletions

View File

@@ -1,4 +1,5 @@
"""Tests for gree component."""
from greeclimate.exceptions import DeviceTimeoutError
import pytest
@@ -54,7 +55,7 @@ async def test_health_mode_disabled_by_default(hass):
],
)
async def test_send_switch_on(
hass: HomeAssistant, entity, entity_registry_enabled_by_default
hass: HomeAssistant, entity, entity_registry_enabled_by_default: None
) -> None:
"""Test for sending power on command to the device."""
await async_setup_gree(hass)
@@ -82,7 +83,7 @@ async def test_send_switch_on(
],
)
async def test_send_switch_on_device_timeout(
hass: HomeAssistant, device, entity, entity_registry_enabled_by_default
hass: HomeAssistant, device, entity, entity_registry_enabled_by_default: None
) -> None:
"""Test for sending power on command to the device with a device timeout."""
device().push_state_update.side_effect = DeviceTimeoutError
@@ -112,7 +113,7 @@ async def test_send_switch_on_device_timeout(
],
)
async def test_send_switch_off(
hass: HomeAssistant, entity, entity_registry_enabled_by_default
hass: HomeAssistant, entity, entity_registry_enabled_by_default: None
) -> None:
"""Test for sending power on command to the device."""
await async_setup_gree(hass)
@@ -140,7 +141,7 @@ async def test_send_switch_off(
],
)
async def test_send_switch_toggle(
hass: HomeAssistant, entity, entity_registry_enabled_by_default
hass: HomeAssistant, entity, entity_registry_enabled_by_default: None
) -> None:
"""Test for sending power on command to the device."""
await async_setup_gree(hass)
@@ -193,7 +194,7 @@ async def test_send_switch_toggle(
],
)
async def test_entity_name(
hass: HomeAssistant, entity, name, entity_registry_enabled_by_default
hass: HomeAssistant, entity, name, entity_registry_enabled_by_default: None
) -> None:
"""Test for name property."""
await async_setup_gree(hass)