Simplify MQTT test for setup manual mqtt item from yaml (#72916)

simplify test setup manual mqtt item from yaml
This commit is contained in:
Jan Bouwhuis
2022-06-13 13:44:12 +02:00
committed by GitHub
parent 48e3d68b53
commit 657e7f9a4c
23 changed files with 48 additions and 116 deletions

View File

@ -2146,13 +2146,11 @@ async def test_encoding_subscribable_topics(
)
async def test_setup_manual_entity_from_yaml(hass, caplog, tmp_path):
async def test_setup_manual_entity_from_yaml(hass):
"""Test setup manual configured MQTT entity."""
platform = light.DOMAIN
config = copy.deepcopy(DEFAULT_CONFIG[platform])
config["name"] = "test"
del config["platform"]
await help_test_setup_manual_entity_from_yaml(
hass, caplog, tmp_path, platform, config
)
await help_test_setup_manual_entity_from_yaml(hass, platform, config)
assert hass.states.get(f"{platform}.test") is not None