Commits

Andriy Kornatskyy committed 3e890de

Added test case for super_defs.

Comments (0)

Files changed (1)

src/wheezy/template/ext/tests/test_core.py

         assert '    Hi, John!\n' == self.render('tmpl.html', {})
         assert '    Hello, John!\n' == self.render('master.html', {})
 
+    def test_super(self):
+        self.templates.update({
+                'master.html': """\
+@def say_hi(name):
+    Hello, @name!\
+@end
+@say_hi('John')""",
+                'tmpl.html': """\
+@extends('master.html')
+@def say_hi(name):
+    @super_defs['say_hi'](name)!!\
+@end
+"""
+        })
+        assert '    Hello, John!!!' == self.render('tmpl.html', {})
+
     def test_include(self):
         self.templates.update({
                 'footer.html': """\