Cleanup mqtt platform tests part 5 (#120719)
This commit is contained in:
parent
a8f4684929
commit
e907c45981
15 changed files with 36 additions and 79 deletions
|
@ -1236,8 +1236,7 @@ async def test_publishing_with_custom_encoding(
|
||||||
|
|
||||||
|
|
||||||
async def test_reloadable(
|
async def test_reloadable(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant, mqtt_client_mock: MqttMockPahoClient
|
||||||
mqtt_client_mock: MqttMockPahoClient,
|
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test reloading the MQTT platform."""
|
"""Test reloading the MQTT platform."""
|
||||||
domain = alarm_control_panel.DOMAIN
|
domain = alarm_control_panel.DOMAIN
|
||||||
|
@ -1260,8 +1259,7 @@ async def test_setup_manual_entity_from_yaml(
|
||||||
|
|
||||||
|
|
||||||
async def test_unload_entry(
|
async def test_unload_entry(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant, mqtt_mock_entry: MqttMockHAClientGenerator
|
||||||
mqtt_mock_entry: MqttMockHAClientGenerator,
|
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test unloading the config entry."""
|
"""Test unloading the config entry."""
|
||||||
domain = alarm_control_panel.DOMAIN
|
domain = alarm_control_panel.DOMAIN
|
||||||
|
|
|
@ -1025,8 +1025,7 @@ async def test_entity_debug_info_message(
|
||||||
|
|
||||||
|
|
||||||
async def test_reloadable(
|
async def test_reloadable(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant, mqtt_client_mock: MqttMockPahoClient
|
||||||
mqtt_client_mock: MqttMockPahoClient,
|
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test reloading the MQTT platform."""
|
"""Test reloading the MQTT platform."""
|
||||||
domain = binary_sensor.DOMAIN
|
domain = binary_sensor.DOMAIN
|
||||||
|
|
|
@ -480,8 +480,7 @@ async def test_publishing_with_custom_encoding(
|
||||||
|
|
||||||
|
|
||||||
async def test_reloadable(
|
async def test_reloadable(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant, mqtt_client_mock: MqttMockPahoClient
|
||||||
mqtt_client_mock: MqttMockPahoClient,
|
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test reloading the MQTT platform."""
|
"""Test reloading the MQTT platform."""
|
||||||
domain = button.DOMAIN
|
domain = button.DOMAIN
|
||||||
|
@ -504,8 +503,7 @@ async def test_setup_manual_entity_from_yaml(
|
||||||
|
|
||||||
|
|
||||||
async def test_unload_entry(
|
async def test_unload_entry(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant, mqtt_mock_entry: MqttMockHAClientGenerator
|
||||||
mqtt_mock_entry: MqttMockHAClientGenerator,
|
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test unloading the config entry."""
|
"""Test unloading the config entry."""
|
||||||
domain = button.DOMAIN
|
domain = button.DOMAIN
|
||||||
|
|
|
@ -389,8 +389,7 @@ async def test_entity_debug_info_message(
|
||||||
|
|
||||||
|
|
||||||
async def test_reloadable(
|
async def test_reloadable(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant, mqtt_client_mock: MqttMockPahoClient
|
||||||
mqtt_client_mock: MqttMockPahoClient,
|
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test reloading the MQTT platform."""
|
"""Test reloading the MQTT platform."""
|
||||||
domain = camera.DOMAIN
|
domain = camera.DOMAIN
|
||||||
|
@ -413,8 +412,7 @@ async def test_setup_manual_entity_from_yaml(
|
||||||
|
|
||||||
|
|
||||||
async def test_unload_entry(
|
async def test_unload_entry(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant, mqtt_mock_entry: MqttMockHAClientGenerator
|
||||||
mqtt_mock_entry: MqttMockHAClientGenerator,
|
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test unloading the config entry."""
|
"""Test unloading the config entry."""
|
||||||
domain = camera.DOMAIN
|
domain = camera.DOMAIN
|
||||||
|
|
|
@ -3461,8 +3461,7 @@ async def test_setup_manual_entity_from_yaml(
|
||||||
|
|
||||||
|
|
||||||
async def test_unload_entry(
|
async def test_unload_entry(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant, mqtt_mock_entry: MqttMockHAClientGenerator
|
||||||
mqtt_mock_entry: MqttMockHAClientGenerator,
|
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test unloading the config entry."""
|
"""Test unloading the config entry."""
|
||||||
domain = cover.DOMAIN
|
domain = cover.DOMAIN
|
||||||
|
|
|
@ -91,8 +91,7 @@ DEFAULT_CONFIG = {
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
async def test_run_lawn_mower_setup_and_state_updates(
|
async def test_run_lawn_mower_setup_and_state_updates(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant, mqtt_mock_entry: MqttMockHAClientGenerator
|
||||||
mqtt_mock_entry: MqttMockHAClientGenerator,
|
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test that it sets up correctly fetches the given payload."""
|
"""Test that it sets up correctly fetches the given payload."""
|
||||||
await mqtt_mock_entry()
|
await mqtt_mock_entry()
|
||||||
|
@ -503,8 +502,7 @@ async def test_discovery_removal_lawn_mower(
|
||||||
|
|
||||||
|
|
||||||
async def test_discovery_update_lawn_mower(
|
async def test_discovery_update_lawn_mower(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant, mqtt_mock_entry: MqttMockHAClientGenerator
|
||||||
mqtt_mock_entry: MqttMockHAClientGenerator,
|
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test update of discovered lawn_mower."""
|
"""Test update of discovered lawn_mower."""
|
||||||
config1 = {
|
config1 = {
|
||||||
|
@ -763,8 +761,7 @@ async def test_publishing_with_custom_encoding(
|
||||||
|
|
||||||
|
|
||||||
async def test_reloadable(
|
async def test_reloadable(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant, mqtt_client_mock: MqttMockPahoClient
|
||||||
mqtt_client_mock: MqttMockPahoClient,
|
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test reloading the MQTT platform."""
|
"""Test reloading the MQTT platform."""
|
||||||
domain = lawn_mower.DOMAIN
|
domain = lawn_mower.DOMAIN
|
||||||
|
@ -818,8 +815,7 @@ async def test_setup_manual_entity_from_yaml(
|
||||||
|
|
||||||
|
|
||||||
async def test_unload_entry(
|
async def test_unload_entry(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant, mqtt_mock_entry: MqttMockHAClientGenerator
|
||||||
mqtt_mock_entry: MqttMockHAClientGenerator,
|
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test unloading the config entry."""
|
"""Test unloading the config entry."""
|
||||||
domain = lawn_mower.DOMAIN
|
domain = lawn_mower.DOMAIN
|
||||||
|
|
|
@ -2559,9 +2559,7 @@ async def test_discovery_removal_light(
|
||||||
|
|
||||||
|
|
||||||
async def test_discovery_ignores_extra_keys(
|
async def test_discovery_ignores_extra_keys(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant, mqtt_mock_entry: MqttMockHAClientGenerator
|
||||||
mqtt_mock_entry: MqttMockHAClientGenerator,
|
|
||||||
caplog: pytest.LogCaptureFixture,
|
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test discovery ignores extra keys that are not blocked."""
|
"""Test discovery ignores extra keys that are not blocked."""
|
||||||
await mqtt_mock_entry()
|
await mqtt_mock_entry()
|
||||||
|
@ -3287,8 +3285,7 @@ async def test_publishing_with_custom_encoding(
|
||||||
|
|
||||||
|
|
||||||
async def test_reloadable(
|
async def test_reloadable(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant, mqtt_client_mock: MqttMockPahoClient
|
||||||
mqtt_client_mock: MqttMockPahoClient,
|
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test reloading the MQTT platform."""
|
"""Test reloading the MQTT platform."""
|
||||||
domain = light.DOMAIN
|
domain = light.DOMAIN
|
||||||
|
@ -3370,7 +3367,6 @@ async def test_encoding_subscribable_topics(
|
||||||
async def test_encoding_subscribable_topics_brightness(
|
async def test_encoding_subscribable_topics_brightness(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
mqtt_mock_entry: MqttMockHAClientGenerator,
|
mqtt_mock_entry: MqttMockHAClientGenerator,
|
||||||
caplog: pytest.LogCaptureFixture,
|
|
||||||
topic: str,
|
topic: str,
|
||||||
value: str,
|
value: str,
|
||||||
attribute: str,
|
attribute: str,
|
||||||
|
@ -3582,8 +3578,7 @@ async def test_setup_manual_entity_from_yaml(
|
||||||
|
|
||||||
|
|
||||||
async def test_unload_entry(
|
async def test_unload_entry(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant, mqtt_mock_entry: MqttMockHAClientGenerator
|
||||||
mqtt_mock_entry: MqttMockHAClientGenerator,
|
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test unloading the config entry."""
|
"""Test unloading the config entry."""
|
||||||
domain = light.DOMAIN
|
domain = light.DOMAIN
|
||||||
|
|
|
@ -185,7 +185,6 @@ class JsonValidator:
|
||||||
"hass_config", [{mqtt.DOMAIN: {light.DOMAIN: {"schema": "json", "name": "test"}}}]
|
"hass_config", [{mqtt.DOMAIN: {light.DOMAIN: {"schema": "json", "name": "test"}}}]
|
||||||
)
|
)
|
||||||
async def test_fail_setup_if_no_command_topic(
|
async def test_fail_setup_if_no_command_topic(
|
||||||
hass: HomeAssistant,
|
|
||||||
mqtt_mock_entry: MqttMockHAClientGenerator,
|
mqtt_mock_entry: MqttMockHAClientGenerator,
|
||||||
caplog: pytest.LogCaptureFixture,
|
caplog: pytest.LogCaptureFixture,
|
||||||
) -> None:
|
) -> None:
|
||||||
|
@ -204,7 +203,6 @@ async def test_fail_setup_if_no_command_topic(
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
async def test_fail_setup_if_color_mode_deprecated(
|
async def test_fail_setup_if_color_mode_deprecated(
|
||||||
hass: HomeAssistant,
|
|
||||||
mqtt_mock_entry: MqttMockHAClientGenerator,
|
mqtt_mock_entry: MqttMockHAClientGenerator,
|
||||||
caplog: pytest.LogCaptureFixture,
|
caplog: pytest.LogCaptureFixture,
|
||||||
) -> None:
|
) -> None:
|
||||||
|
@ -233,7 +231,6 @@ async def test_fail_setup_if_color_mode_deprecated(
|
||||||
ids=["color_temp", "hs", "rgb", "xy", "color_temp, rgb"],
|
ids=["color_temp", "hs", "rgb", "xy", "color_temp, rgb"],
|
||||||
)
|
)
|
||||||
async def test_warning_if_color_mode_flags_are_used(
|
async def test_warning_if_color_mode_flags_are_used(
|
||||||
hass: HomeAssistant,
|
|
||||||
mqtt_mock_entry: MqttMockHAClientGenerator,
|
mqtt_mock_entry: MqttMockHAClientGenerator,
|
||||||
caplog: pytest.LogCaptureFixture,
|
caplog: pytest.LogCaptureFixture,
|
||||||
color_modes: tuple[str, ...],
|
color_modes: tuple[str, ...],
|
||||||
|
@ -316,7 +313,6 @@ async def test_warning_on_discovery_if_color_mode_flags_are_used(
|
||||||
ids=["color_temp"],
|
ids=["color_temp"],
|
||||||
)
|
)
|
||||||
async def test_warning_if_color_mode_option_flag_is_used(
|
async def test_warning_if_color_mode_option_flag_is_used(
|
||||||
hass: HomeAssistant,
|
|
||||||
mqtt_mock_entry: MqttMockHAClientGenerator,
|
mqtt_mock_entry: MqttMockHAClientGenerator,
|
||||||
caplog: pytest.LogCaptureFixture,
|
caplog: pytest.LogCaptureFixture,
|
||||||
) -> None:
|
) -> None:
|
||||||
|
@ -393,7 +389,6 @@ async def test_warning_on_discovery_if_color_mode_option_flag_is_used(
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
async def test_fail_setup_if_color_modes_invalid(
|
async def test_fail_setup_if_color_modes_invalid(
|
||||||
hass: HomeAssistant,
|
|
||||||
mqtt_mock_entry: MqttMockHAClientGenerator,
|
mqtt_mock_entry: MqttMockHAClientGenerator,
|
||||||
caplog: pytest.LogCaptureFixture,
|
caplog: pytest.LogCaptureFixture,
|
||||||
error: str,
|
error: str,
|
||||||
|
@ -421,8 +416,7 @@ async def test_fail_setup_if_color_modes_invalid(
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
async def test_single_color_mode(
|
async def test_single_color_mode(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant, mqtt_mock_entry: MqttMockHAClientGenerator
|
||||||
mqtt_mock_entry: MqttMockHAClientGenerator,
|
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test setup with single color_mode."""
|
"""Test setup with single color_mode."""
|
||||||
await mqtt_mock_entry()
|
await mqtt_mock_entry()
|
||||||
|
@ -448,8 +442,7 @@ async def test_single_color_mode(
|
||||||
|
|
||||||
@pytest.mark.parametrize("hass_config", [COLOR_MODES_CONFIG])
|
@pytest.mark.parametrize("hass_config", [COLOR_MODES_CONFIG])
|
||||||
async def test_turn_on_with_unknown_color_mode_optimistic(
|
async def test_turn_on_with_unknown_color_mode_optimistic(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant, mqtt_mock_entry: MqttMockHAClientGenerator
|
||||||
mqtt_mock_entry: MqttMockHAClientGenerator,
|
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test setup and turn with unknown color_mode in optimistic mode."""
|
"""Test setup and turn with unknown color_mode in optimistic mode."""
|
||||||
await mqtt_mock_entry()
|
await mqtt_mock_entry()
|
||||||
|
@ -486,8 +479,7 @@ async def test_turn_on_with_unknown_color_mode_optimistic(
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
async def test_controlling_state_with_unknown_color_mode(
|
async def test_controlling_state_with_unknown_color_mode(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant, mqtt_mock_entry: MqttMockHAClientGenerator
|
||||||
mqtt_mock_entry: MqttMockHAClientGenerator,
|
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test setup and turn with unknown color_mode in optimistic mode."""
|
"""Test setup and turn with unknown color_mode in optimistic mode."""
|
||||||
await mqtt_mock_entry()
|
await mqtt_mock_entry()
|
||||||
|
@ -2658,8 +2650,7 @@ async def test_publishing_with_custom_encoding(
|
||||||
|
|
||||||
|
|
||||||
async def test_reloadable(
|
async def test_reloadable(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant, mqtt_client_mock: MqttMockPahoClient
|
||||||
mqtt_client_mock: MqttMockPahoClient,
|
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test reloading the MQTT platform."""
|
"""Test reloading the MQTT platform."""
|
||||||
domain = light.DOMAIN
|
domain = light.DOMAIN
|
||||||
|
|
|
@ -1280,8 +1280,7 @@ async def test_publishing_with_custom_encoding(
|
||||||
|
|
||||||
|
|
||||||
async def test_reloadable(
|
async def test_reloadable(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant, mqtt_client_mock: MqttMockPahoClient
|
||||||
mqtt_client_mock: MqttMockPahoClient,
|
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test reloading the MQTT platform."""
|
"""Test reloading the MQTT platform."""
|
||||||
domain = light.DOMAIN
|
domain = light.DOMAIN
|
||||||
|
@ -1335,8 +1334,7 @@ async def test_setup_manual_entity_from_yaml(
|
||||||
|
|
||||||
|
|
||||||
async def test_unload_entry(
|
async def test_unload_entry(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant, mqtt_mock_entry: MqttMockHAClientGenerator
|
||||||
mqtt_mock_entry: MqttMockHAClientGenerator,
|
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test unloading the config entry."""
|
"""Test unloading the config entry."""
|
||||||
domain = light.DOMAIN
|
domain = light.DOMAIN
|
||||||
|
|
|
@ -996,8 +996,7 @@ async def test_publishing_with_custom_encoding(
|
||||||
|
|
||||||
|
|
||||||
async def test_reloadable(
|
async def test_reloadable(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant, mqtt_client_mock: MqttMockPahoClient
|
||||||
mqtt_client_mock: MqttMockPahoClient,
|
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test reloading the MQTT platform."""
|
"""Test reloading the MQTT platform."""
|
||||||
domain = lock.DOMAIN
|
domain = lock.DOMAIN
|
||||||
|
@ -1047,8 +1046,7 @@ async def test_setup_manual_entity_from_yaml(
|
||||||
|
|
||||||
|
|
||||||
async def test_unload_entry(
|
async def test_unload_entry(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant, mqtt_mock_entry: MqttMockHAClientGenerator
|
||||||
mqtt_mock_entry: MqttMockHAClientGenerator,
|
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test unloading the config entry."""
|
"""Test unloading the config entry."""
|
||||||
domain = lock.DOMAIN
|
domain = lock.DOMAIN
|
||||||
|
|
|
@ -15,7 +15,7 @@ from homeassistant.core import CoreState, HomeAssistant, callback
|
||||||
from homeassistant.helpers import device_registry as dr, issue_registry as ir
|
from homeassistant.helpers import device_registry as dr, issue_registry as ir
|
||||||
|
|
||||||
from tests.common import MockConfigEntry, async_capture_events, async_fire_mqtt_message
|
from tests.common import MockConfigEntry, async_capture_events, async_fire_mqtt_message
|
||||||
from tests.typing import MqttMockHAClientGenerator, MqttMockPahoClient
|
from tests.typing import MqttMockHAClientGenerator
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
|
@ -37,8 +37,7 @@ from tests.typing import MqttMockHAClientGenerator, MqttMockPahoClient
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
async def test_availability_with_shared_state_topic(
|
async def test_availability_with_shared_state_topic(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant, mqtt_mock_entry: MqttMockHAClientGenerator
|
||||||
mqtt_mock_entry: MqttMockHAClientGenerator,
|
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test the state is not changed twice.
|
"""Test the state is not changed twice.
|
||||||
|
|
||||||
|
@ -295,11 +294,10 @@ async def test_availability_with_shared_state_topic(
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
@patch("homeassistant.components.mqtt.client.DISCOVERY_COOLDOWN", 0.0)
|
@patch("homeassistant.components.mqtt.client.DISCOVERY_COOLDOWN", 0.0)
|
||||||
|
@pytest.mark.usefixtures("mqtt_client_mock")
|
||||||
async def test_default_entity_and_device_name(
|
async def test_default_entity_and_device_name(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
device_registry: dr.DeviceRegistry,
|
device_registry: dr.DeviceRegistry,
|
||||||
mqtt_client_mock: MqttMockPahoClient,
|
|
||||||
mqtt_config_entry_data,
|
|
||||||
caplog: pytest.LogCaptureFixture,
|
caplog: pytest.LogCaptureFixture,
|
||||||
entity_id: str,
|
entity_id: str,
|
||||||
friendly_name: str,
|
friendly_name: str,
|
||||||
|
@ -341,8 +339,7 @@ async def test_default_entity_and_device_name(
|
||||||
|
|
||||||
|
|
||||||
async def test_name_attribute_is_set_or_not(
|
async def test_name_attribute_is_set_or_not(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant, mqtt_mock_entry: MqttMockHAClientGenerator
|
||||||
mqtt_mock_entry: MqttMockHAClientGenerator,
|
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test frendly name with device_class set.
|
"""Test frendly name with device_class set.
|
||||||
|
|
||||||
|
|
|
@ -427,8 +427,7 @@ async def test_setup_manual_entity_from_yaml(
|
||||||
|
|
||||||
|
|
||||||
async def test_unload_entry(
|
async def test_unload_entry(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant, mqtt_mock_entry: MqttMockHAClientGenerator
|
||||||
mqtt_mock_entry: MqttMockHAClientGenerator,
|
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test unloading the config entry."""
|
"""Test unloading the config entry."""
|
||||||
domain = notify.DOMAIN
|
domain = notify.DOMAIN
|
||||||
|
|
|
@ -783,7 +783,6 @@ async def test_min_max_step_attributes(
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
async def test_invalid_min_max_attributes(
|
async def test_invalid_min_max_attributes(
|
||||||
hass: HomeAssistant,
|
|
||||||
mqtt_mock_entry: MqttMockHAClientGenerator,
|
mqtt_mock_entry: MqttMockHAClientGenerator,
|
||||||
caplog: pytest.LogCaptureFixture,
|
caplog: pytest.LogCaptureFixture,
|
||||||
) -> None:
|
) -> None:
|
||||||
|
@ -863,7 +862,7 @@ async def test_default_mode(
|
||||||
async def test_mode(
|
async def test_mode(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
mqtt_mock_entry: MqttMockHAClientGenerator,
|
mqtt_mock_entry: MqttMockHAClientGenerator,
|
||||||
mode,
|
mode: str,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test mode."""
|
"""Test mode."""
|
||||||
await mqtt_mock_entry()
|
await mqtt_mock_entry()
|
||||||
|
@ -1022,8 +1021,7 @@ async def test_publishing_with_custom_encoding(
|
||||||
|
|
||||||
|
|
||||||
async def test_reloadable(
|
async def test_reloadable(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant, mqtt_client_mock: MqttMockPahoClient
|
||||||
mqtt_client_mock: MqttMockPahoClient,
|
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test reloading the MQTT platform."""
|
"""Test reloading the MQTT platform."""
|
||||||
domain = number.DOMAIN
|
domain = number.DOMAIN
|
||||||
|
@ -1074,8 +1072,7 @@ async def test_setup_manual_entity_from_yaml(
|
||||||
|
|
||||||
|
|
||||||
async def test_unload_entry(
|
async def test_unload_entry(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant, mqtt_mock_entry: MqttMockHAClientGenerator
|
||||||
mqtt_mock_entry: MqttMockHAClientGenerator,
|
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test unloading the config entry."""
|
"""Test unloading the config entry."""
|
||||||
domain = number.DOMAIN
|
domain = number.DOMAIN
|
||||||
|
|
|
@ -382,8 +382,7 @@ async def test_publishing_with_custom_encoding(
|
||||||
|
|
||||||
|
|
||||||
async def test_reloadable(
|
async def test_reloadable(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant, mqtt_client_mock: MqttMockPahoClient
|
||||||
mqtt_client_mock: MqttMockPahoClient,
|
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test reloading the MQTT platform."""
|
"""Test reloading the MQTT platform."""
|
||||||
domain = scene.DOMAIN
|
domain = scene.DOMAIN
|
||||||
|
@ -406,8 +405,7 @@ async def test_setup_manual_entity_from_yaml(
|
||||||
|
|
||||||
|
|
||||||
async def test_unload_entry(
|
async def test_unload_entry(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant, mqtt_mock_entry: MqttMockHAClientGenerator
|
||||||
mqtt_mock_entry: MqttMockHAClientGenerator,
|
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test unloading the config entry."""
|
"""Test unloading the config entry."""
|
||||||
domain = scene.DOMAIN
|
domain = scene.DOMAIN
|
||||||
|
|
|
@ -615,9 +615,7 @@ def _test_options_attributes_options_config(
|
||||||
_test_options_attributes_options_config((["milk", "beer"], ["milk"], [])),
|
_test_options_attributes_options_config((["milk", "beer"], ["milk"], [])),
|
||||||
)
|
)
|
||||||
async def test_options_attributes(
|
async def test_options_attributes(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant, mqtt_mock_entry: MqttMockHAClientGenerator, options: list[str]
|
||||||
mqtt_mock_entry: MqttMockHAClientGenerator,
|
|
||||||
options: list[str],
|
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test options attribute."""
|
"""Test options attribute."""
|
||||||
await mqtt_mock_entry()
|
await mqtt_mock_entry()
|
||||||
|
@ -701,8 +699,7 @@ async def test_publishing_with_custom_encoding(
|
||||||
|
|
||||||
|
|
||||||
async def test_reloadable(
|
async def test_reloadable(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant, mqtt_client_mock: MqttMockPahoClient
|
||||||
mqtt_client_mock: MqttMockPahoClient,
|
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test reloading the MQTT platform."""
|
"""Test reloading the MQTT platform."""
|
||||||
domain = select.DOMAIN
|
domain = select.DOMAIN
|
||||||
|
@ -755,8 +752,7 @@ async def test_setup_manual_entity_from_yaml(
|
||||||
|
|
||||||
|
|
||||||
async def test_unload_entry(
|
async def test_unload_entry(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant, mqtt_mock_entry: MqttMockHAClientGenerator
|
||||||
mqtt_mock_entry: MqttMockHAClientGenerator,
|
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test unloading the config entry."""
|
"""Test unloading the config entry."""
|
||||||
domain = select.DOMAIN
|
domain = select.DOMAIN
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue