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

View file

@ -1197,13 +1197,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 = sensor.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