Commit 2825d34e by Carl Whittaker

Removing cruft.

parent ede055af
...@@ -61,9 +61,6 @@ class Template(object): ...@@ -61,9 +61,6 @@ class Template(object):
it = self.view.get(section_name, None) it = self.view.get(section_name, None)
replacer = '' replacer = ''
# Exception
if it and isinstance(it, Exception):
raise it
# Callable # Callable
if it and isinstance(it, collections.Callable): if it and isinstance(it, collections.Callable):
replacer = it(inner) replacer = it(inner)
......
...@@ -97,12 +97,6 @@ class TestView(unittest.TestCase): ...@@ -97,12 +97,6 @@ class TestView(unittest.TestCase):
view.template = "{{#parent}}{{#children}}{{this}}{{/children}}{{/parent}}" view.template = "{{#parent}}{{#children}}{{this}}{{/children}}{{/parent}}"
self.assertEquals(view.render(), 'derp') self.assertEquals(view.render(), 'derp')
def test_context_returns_a_flattened_dict(self):
view = Simple()
view.context_list = [{'one':'1'}, {'two':'2'}]
self.assertEqual(view.context, {'one': '1', 'two': '2'})
if __name__ == '__main__': if __name__ == '__main__':
unittest.main() unittest.main()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment