Commit a28a5fe3 by Chris Jerdonek

Removed View.__str__().

parent 18b6c253
......@@ -116,9 +116,6 @@ class View(object):
def get(self, key, default=None):
return self.context.get(key, default)
def __str__(self):
return self.render()
class Locator(object):
......
......@@ -77,13 +77,6 @@ class ViewTestCase(unittest.TestCase):
view.thing = 'Chris'
self.assertEquals(view.render(), "Hi Chris!")
def test_view_instances_as_attributes(self):
other = Simple(context={'name': 'chris'})
other.template = '{{name}}'
view = Simple()
view.thing = other
self.assertEquals(view.render(), "Hi chris!")
def test_complex(self):
self.assertEquals(ComplexView().render(),
"""<h1>Colors</h1><ul><li><strong>red</strong></li><li><a href="#Green">green</a></li><li><a href="#Blue">blue</a></li></ul>""")
......
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