Commit f5b37f72 by Chris Jerdonek

Removed the word "view" from the Complex example.

parent dec5054d
class ComplexView(object): class Complex(object):
def header(self): def header(self):
return "Colors" return "Colors"
......
...@@ -3,7 +3,7 @@ import unittest ...@@ -3,7 +3,7 @@ import unittest
import pystache import pystache
from pystache import Renderer from pystache import Renderer
from examples.nested_context import NestedContext from examples.nested_context import NestedContext
from examples.complex_view import ComplexView from examples.complex import Complex
from examples.lambdas import Lambdas from examples.lambdas import Lambdas
from examples.template_partial import TemplatePartial from examples.template_partial import TemplatePartial
from examples.simple import Simple from examples.simple import Simple
...@@ -20,7 +20,7 @@ class TestSimple(unittest.TestCase, AssertStringMixin): ...@@ -20,7 +20,7 @@ class TestSimple(unittest.TestCase, AssertStringMixin):
def test_looping_and_negation_context(self): def test_looping_and_negation_context(self):
template = '{{#item}}{{header}}: {{name}} {{/item}}{{^item}} Shouldnt see me{{/item}}' template = '{{#item}}{{header}}: {{name}} {{/item}}{{^item}} Shouldnt see me{{/item}}'
context = ComplexView() context = Complex()
renderer = Renderer() renderer = Renderer()
expected = renderer.render(template, context) expected = renderer.render(template, context)
......
...@@ -10,7 +10,7 @@ import sys ...@@ -10,7 +10,7 @@ import sys
import unittest import unittest
from examples.simple import Simple from examples.simple import Simple
from examples.complex_view import ComplexView from examples.complex import Complex
from examples.lambdas import Lambdas from examples.lambdas import Lambdas
from examples.inverted import Inverted, InvertedLists from examples.inverted import Inverted, InvertedLists
from pystache import TemplateSpec as Template from pystache import TemplateSpec as Template
...@@ -84,8 +84,8 @@ class ViewTestCase(unittest.TestCase, AssertStringMixin): ...@@ -84,8 +84,8 @@ class ViewTestCase(unittest.TestCase, AssertStringMixin):
def test_complex(self): def test_complex(self):
renderer = Renderer() renderer = Renderer()
expected = renderer.render(ComplexView()) expected = renderer.render(Complex())
self.assertEquals(expected, """\ self.assertString(expected, u"""\
<h1>Colors</h1> <h1>Colors</h1>
<ul> <ul>
<li><strong>red</strong></li> <li><strong>red</strong></li>
......
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