Improve mqtt test (#42490)

This commit is contained in:
Paulus Schoutsen 2020-10-27 23:22:59 +01:00 committed by GitHub
parent f0b676607d
commit d4efa938dd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 3 deletions

View file

@ -2698,3 +2698,13 @@ async def test_result_wrappers(hass):
assert result == native
assert result.render_result == text
schema(result) # should not raise
async def test_parse_result(hass):
"""Test parse result."""
for tpl, result in (
('{{ "{{}}" }}', "{{}}"),
("not-something", "not-something"),
("2a", "2a"),
):
assert template.Template(tpl, hass).async_render() == result