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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 211 additions and 45 deletions

View file

@ -18,6 +18,7 @@ from .test_common import (
help_test_discovery_removal,
help_test_discovery_update,
help_test_discovery_update_unchanged,
help_test_reloadable,
help_test_unique_id,
)
@ -175,3 +176,10 @@ async def test_discovery_broken(hass, mqtt_mock, caplog):
await help_test_discovery_broken(
hass, mqtt_mock, caplog, scene.DOMAIN, data1, data2
)
async def test_reloadable(hass, mqtt_mock, caplog, tmp_path):
"""Test reloading the MQTT platform."""
domain = scene.DOMAIN
config = DEFAULT_CONFIG[domain]
await help_test_reloadable(hass, mqtt_mock, caplog, tmp_path, domain, config)