Apply registry type hints on mqtt platform tests (#87758)

Apply registry fixture types on platform tests
This commit is contained in:
epenet
2023-02-09 11:53:56 +01:00
committed by GitHub
parent 678d1e367d
commit bb174780b9
28 changed files with 188 additions and 97 deletions

View File

@@ -243,7 +243,9 @@ def light_platform_only():
yield
async def test_fail_setup_if_no_command_topic(hass: HomeAssistant, caplog) -> None:
async def test_fail_setup_if_no_command_topic(
hass: HomeAssistant, caplog: pytest.LogCaptureFixture
) -> None:
"""Test if command fails with command topic."""
assert not await async_setup_component(
hass, mqtt.DOMAIN, {mqtt.DOMAIN: {light.DOMAIN: {"name": "test"}}}
@@ -2074,7 +2076,9 @@ async def test_white_state_update(
assert state.attributes.get(light.ATTR_SUPPORTED_COLOR_MODES) == color_modes
async def test_effect(hass: HomeAssistant, mqtt_mock_entry_with_yaml_config) -> None:
async def test_effect(
hass: HomeAssistant, mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator
) -> None:
"""Test effect."""
config = {
light.DOMAIN: {
@@ -2223,7 +2227,9 @@ async def test_discovery_update_attr(
)
async def test_unique_id(hass: HomeAssistant, mqtt_mock_entry_with_yaml_config) -> None:
async def test_unique_id(
hass: HomeAssistant, mqtt_mock_entry_with_yaml_config: MqttMockHAClientGenerator
) -> None:
"""Test unique id option only creates one light per unique_id."""
config = {
mqtt.DOMAIN: {