Commit b06c64ae by Chris Wanstrath

double section test

parent 89d8c829
{{#t}}
* first
{{/t}}
* {{two}}
{{#t}}
* third
{{/t}}
\ No newline at end of file
import pystache
class DoubleSection(pystache.View):
template_path = 'examples'
def t(self):
return True
def two(self):
return "second"
......@@ -2,8 +2,14 @@ import unittest
import pystache
from examples.comments import Comments
from examples.double_section import DoubleSection
class TestView(unittest.TestCase):
def test_comments(self):
self.assertEquals(Comments().render(), """<h1>A Comedy of Errors</h1>
""")
def test_double_section(self):
self.assertEquals(DoubleSection().render(), """* first
* second
* third""")
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