Commit 702239d1 by Chris Jerdonek

Merge pull request #45 (1) "Adding failing tests for issue #44"

From: https://github.com/jakearchibald/pystache/commit/9923bef5008dd901f90527f18e1ac7d0df30a890
Into: issue_44

Adds two failing unit tests.

Conflicts:
	tests/test_pystache.py
parents ab1d2fb1 9923bef5
...@@ -82,3 +82,22 @@ class TemplateTestCase(unittest.TestCase): ...@@ -82,3 +82,22 @@ class TemplateTestCase(unittest.TestCase):
self.assertTrue(isinstance(actual, str)) self.assertTrue(isinstance(actual, str))
self.assertEquals(actual, 'Poincaré') self.assertEquals(actual, 'Poincaré')
def test_render__tag_in_value(self):
"""
Context values should not be treated as templates (issue #44).
"""
template = Template('{{test}}')
context = {'test': '{{hello}}'}
actual = template.render(context)
self.assertEquals(actual, '{{hello}}')
def test_render__section_in_value(self):
"""
Context values should not be treated as templates (issue #44).
"""
template = Template('{{test}}')
context = {'test': '{{#hello}}'}
actual = template.render(context)
self.assertEquals(actual, '{{#hello}}')
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