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

@@ -62,6 +62,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,
@@ -1146,3 +1147,10 @@ async def test_publishing_with_custom_encoding(
tpl_par=tpl_par,
tpl_output=tpl_output,
)
async def test_reloadable(hass, mqtt_mock, caplog, tmp_path):
"""Test reloading the MQTT platform."""
domain = light.DOMAIN
config = DEFAULT_CONFIG[domain]
await help_test_reloadable(hass, mqtt_mock, caplog, tmp_path, domain, config)