diff options
Diffstat (limited to 'test/test_templite.py')
-rw-r--r-- | test/test_templite.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/test_templite.py b/test/test_templite.py index 6b445aa2..f2c20f94 100644 --- a/test/test_templite.py +++ b/test/test_templite.py @@ -191,13 +191,18 @@ class TempliteTest(unittest.TestCase): "@a0b0c0a1b1c1a2b2c2!" ) - def test_exception(self): + def test_exception_during_evaluation(self): # TypeError: Couldn't evaluate {{ foo.bar.baz }}: # 'NoneType' object is unsubscriptable self.assertRaises(TypeError, self.try_render, "Hey {{foo.bar.baz}} there", {'foo': None}, "Hey XXX there" ) + def test_bogus_tag_syntax(self): + self.assertRaises(SyntaxError, self.try_render, + "Huh: {% bogus %}!!{% endbogus %}??", {}, "" + ) + if __name__ == '__main__': unittest.main() |