1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

Fix mqtt reloading and rework tests (#62950)

* Improve mqtt reloading/tests and fix issues

* Cleanup fixture for reloading test

* isort and black remove replaced test_reloadable
This commit is contained in:
Jan Bouwhuis
2022-01-03 15:14:50 +01:00
committed by GitHub
parent 0dab5e69db
commit 061ce0c187
22 changed files with 211 additions and 45 deletions

View File

@@ -33,6 +33,7 @@ from .test_common import (
help_test_entity_id_update_discovery_update,
help_test_entity_id_update_subscriptions,
help_test_publishing_with_custom_encoding,
help_test_reloadable,
help_test_setting_attribute_via_mqtt_json_message,
help_test_setting_attribute_with_template,
help_test_setting_blocked_attribute_via_mqtt_json_message,
@@ -515,3 +516,10 @@ async def test_publishing_with_custom_encoding(
payload,
template,
)
async def test_reloadable(hass, mqtt_mock, caplog, tmp_path):
"""Test reloading the MQTT platform."""
domain = switch.DOMAIN
config = DEFAULT_CONFIG[domain]
await help_test_reloadable(hass, mqtt_mock, caplog, tmp_path, domain, config)