diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_templite.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test_templite.py b/tests/test_templite.py index e3918e4b..7326d241 100644 --- a/tests/test_templite.py +++ b/tests/test_templite.py @@ -39,6 +39,14 @@ class TempliteTest(CoverageTest): # Variables use {{var}} syntax. self.try_render("Hello, {{name}}!", {'name':'Ned'}, "Hello, Ned!") + def test_undefined_variables(self): + # Using undefined names is an error. + self.assertRaises( + Exception, + self.try_render, + "Hi, {{name}}!", {}, "xyz" + ) + def test_pipes(self): # Variables can be filtered with pipes. data = { |