Add ord() to template filters (#25398)

* Add ord() to template filters

* Remove trailing whitespace

* add test
This commit is contained in:
aschamberger authored and Paulus Schoutsen committed 2019-07-25 15:06:51 -07:00
1 parent ea5d3ce85a
commit 3512d05467
2 files changed
+7

No files matched your search

+6
View File
@@ -388,6 +388,12 @@ def test_max(hass):
hass).async_render() == '3'
def test_ord(hass):
"""Test the ord filter."""
assert template.Template('{{ "d" | ord }}',
hass).async_render() == '100'
def test_base64_encode(hass):
"""Test the base64_encode filter."""
assert template.Template('{{ "homeassistant" | base64_encode }}',