Skip to content

Commit

Permalink
minor: add unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
normal-wls committed Aug 13, 2024
1 parent 60a35d2 commit 6c9a89a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/template/test_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ def test_render():
nested_dict_template = Template("${a[0][3]['a']}")
assert nested_dict_template.render({"a": [[1, 2, 3, {"a": [1,2,3]}], [5, 6, 7, 8]]}) == [1,2,3]

type_error_template = Template("${a[1]}")
assert type_error_template.render({"a": 1}) == "${a[1]}"

Settings.ENABLE_RENDER_OBJ_BY_MAKO_STRING = default_enable_value


Expand Down

0 comments on commit 6c9a89a

Please sign in to comment.