Skip to content

Commit

Permalink
Add another test
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidNew-NOAA committed Jun 14, 2024
1 parent a26ca2d commit 98b5661
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/test_jinja.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ def test_render_file(tmp_path, create_template):
j = Jinja(str(file_path), data, allow_missing=False)
assert j.render == f"Hello Jane! How are you? It is: {to_isotime(current_date)}"

tmpl_dict = {"{{ name }}": "Jane", "{{ greeting }}": "How are you?", "{{ current_date | to_isotime }}": to_isotime(current_date)}
j = Jinja(str(file_path), data, allow_missing=False)
loader = jinja2.BaseLoader()
env = j.get_set_env(loader)
assert env.filters['replace_tmpl'](j2tmpl, tmpl_dict) == f"Hello Jane! How are you? It is: {to_isotime(current_date)}"


def test_include(tmp_path, create_template):

Expand Down

0 comments on commit 98b5661

Please sign in to comment.