Skip to content

Commit

Permalink
failing template partial test
Browse files Browse the repository at this point in the history
  • Loading branch information
defunkt committed Nov 13, 2009
1 parent 4f5997e commit 24bdeb2
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/inner_partial.mustache
@@ -0,0 +1 @@
Again, {{title}}!
2 changes: 2 additions & 0 deletions examples/template_partial.mustache
@@ -0,0 +1,2 @@
<h1>{{title}}</h1>
{{>inner_partial}}
10 changes: 10 additions & 0 deletions examples/template_partial.py
@@ -0,0 +1,10 @@
import pystache

class TemplatePartial(pystache.View):
template_path = 'examples'

def title(self):
return "Welcome"

def title_bars(self):
return '-' * title.size
3 changes: 3 additions & 0 deletions tests/test_examples.py
Expand Up @@ -5,6 +5,7 @@
from examples.double_section import DoubleSection
from examples.escaped import Escaped
from examples.unescaped import Unescaped
from examples.template_partial import TemplatePartial

class TestView(unittest.TestCase):
def test_comments(self):
Expand All @@ -22,3 +23,5 @@ def test_escaped(self):
def test_unescaped(self):
self.assertEquals(Unescaped().render(), "<h1>Bear > Shark</h1>")

def test_template_partial(self):
self.assertEquals(TemplatePartial().render(), 'blah')

0 comments on commit 24bdeb2

Please sign in to comment.