Fix string representation of template result wrappers (#42494)

This commit is contained in:
Paulus Schoutsen authored and GitHub committed 2020-10-28 09:11:08 +01:00
1 parent ce51286c53
commit e21e28e49f
5 files changed
+26 -12

No files matched your search

+6
View File
@@ -2698,6 +2698,12 @@ async def test_result_wrappers(hass):
assert result == native
assert result.render_result == text
schema(result) # should not raise
# Result with render text stringifies to original text
assert str(result) == text
# Result without render text stringifies same as original type
assert str(template.RESULT_WRAPPERS[orig_type](native)) == str(
orig_type(native)
)
async def test_parse_result(hass):