diff options
author | Carl Whittaker <carl.whittaker@hogarthww.com> | 2011-01-27 15:50:45 +0000 |
---|---|---|
committer | Carl Whittaker <carl.whittaker@hogarthww.com> | 2011-01-27 15:50:45 +0000 |
commit | 16ce94a29e4e9711c5aa1f9568822b38ffc324a5 (patch) | |
tree | d269911cc5ff095ce6ca3c29fd4fa845cccbddad /tests/test_examples.py | |
parent | ac941e567d7afa948fc0a57be21d593408f84a84 (diff) | |
download | pystache-16ce94a29e4e9711c5aa1f9568822b38ffc324a5.tar.gz |
Moving context logic into view
Diffstat (limited to 'tests/test_examples.py')
-rw-r--r-- | tests/test_examples.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/tests/test_examples.py b/tests/test_examples.py index 0b405f1..1e861bd 100644 --- a/tests/test_examples.py +++ b/tests/test_examples.py @@ -19,9 +19,7 @@ class TestView(unittest.TestCase): """) def test_double_section(self): - self.assertEquals(DoubleSection().render(), """* first -* second -* third""") + self.assertEquals(DoubleSection().render(),"""* first\n* second\n* third""") def test_unicode_output(self): self.assertEquals(UnicodeOutput().render(), u'<p>Name: Henri Poincaré</p>') @@ -77,8 +75,7 @@ Again, Welcome! self.assertEquals(view.render(), 'it works!') def test_partial_in_partial_has_access_to_grand_parent_context(self): - view = TemplatePartial() - view.context = {'prop': 'derp'} + view = TemplatePartial(context = {'prop': 'derp'}) view.template = '''{{>partial_in_partial}}''' self.assertEquals(view.render(), 'Hi derp!') |