diff options
Diffstat (limited to 'test/template.py')
| -rw-r--r-- | test/template.py | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/test/template.py b/test/template.py index 634a9a3..0c491f1 100644 --- a/test/template.py +++ b/test/template.py @@ -218,11 +218,22 @@ class PageArgsTest(unittest.TestCase): def test_canuse_builtin_names(self): template = Template(""" - exception: ${exception} + exception: ${Exception} id: ${id} """) - assert flatten_result(template.render(id='some id', exception='some exception')) == "exception: some exception id: some id" - + assert flatten_result(template.render(id='some id', Exception='some exception')) == "exception: some exception id: some id" + + def test_dict_locals(self): + template = Template(""" + <% + dict = "this is dict" + locals = "this is locals" + %> + dict: ${dict} + locals: ${locals} + """) + assert flatten_result(template.render()) == "dict: this is dict locals: this is locals" + class IncludeTest(unittest.TestCase): def test_basic(self): lookup = TemplateLookup() |
