summaryrefslogtreecommitdiff
path: root/tests/test_examples.py
diff options
context:
space:
mode:
authorPaul Bonser <pib@paulbonser.com>2010-05-13 05:51:26 +0800
committerChris Wanstrath <chris@ozmm.org>2010-05-15 00:54:04 +0800
commit3bcd6b632c3bed0a99ed2b18516dd17f395ede73 (patch)
tree6a45c028bcc093af25caa58ec8efe9df25f9e42c /tests/test_examples.py
parent7d7ddeb4a28687ba4a6c1f4ec83b46ce21832e13 (diff)
downloadpystache-3bcd6b632c3bed0a99ed2b18516dd17f395ede73.tar.gz
add support for nested contexts as described in the "Non-False Values" section of http://mustache.github.com/mustache.5.html
Diffstat (limited to 'tests/test_examples.py')
-rw-r--r--tests/test_examples.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/test_examples.py b/tests/test_examples.py
index ccc254f..af67735 100644
--- a/tests/test_examples.py
+++ b/tests/test_examples.py
@@ -11,6 +11,7 @@ from examples.template_partial import TemplatePartial
from examples.delimiters import Delimiters
from examples.unicode_output import UnicodeOutput
from examples.unicode_input import UnicodeInput
+from examples.nested_context import NestedContext
class TestView(unittest.TestCase):
def test_comments(self):
@@ -67,5 +68,8 @@ Again, Welcome!
* Then, surprisingly, it worked the third time.
""")
+ def test_nested_context(self):
+ self.assertEquals(NestedContext().render(), "one and foo")
+
if __name__ == '__main__':
unittest.main()