mirror of
https://github.com/kennethreitz-archive/pystache.git
synced 2026-06-05 23:40:16 +00:00
Adding tests for a hierarchy of partials and lambdas in each.
This commit is contained in:
@@ -0,0 +1 @@
|
||||
{{>partial_with_lambda}}{{#rot13}}abcdefghijklm{{/rot13}}
|
||||
+6
-1
@@ -76,10 +76,15 @@ class TestView(unittest.TestCase):
|
||||
view.template = '{{#sort}}zyxwvutsrqponmlkjihgfedcba{{/sort}}'
|
||||
self.assertEquals(view.render(), 'abcdefghijklmnopqrstuvwxyz')
|
||||
|
||||
def test_partials_with_lambdas(self):
|
||||
def test_partials_with_lambda(self):
|
||||
view = Lambdas()
|
||||
view.template = '{{>partial_with_lambda}}'
|
||||
self.assertEquals(view.render(), 'nopqrstuvwxyz')
|
||||
|
||||
def test_hierarchical_partials_with_lambdas(self):
|
||||
view = Lambdas()
|
||||
view.template = '{{>partial_with_partial_and_lambda}}'
|
||||
self.assertEquals(view.render(), 'nopqrstuvwxyznopqrstuvwxyz')
|
||||
|
||||
def test_inverted(self):
|
||||
view = Inverted()
|
||||
|
||||
Reference in New Issue
Block a user