1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

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
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