Here are the examples of the python api twisted.web.error.MissingRenderMethod taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
2 Examples
3
Example 1
Project: SubliminalCollaborator Source File: test_template.py
def test_missingRenderMethodRepr(self):
"""
A L{MissingRenderMethod} instance can be repr()'d without error.
"""
class PrettyReprElement(Element):
def __repr__(self):
return 'Pretty Repr Element'
s = repr(MissingRenderMethod(PrettyReprElement(),
'expectedMethod'))
self.assertIn('Pretty Repr Element', s)
self.assertIn('expectedMethod', s)
3
Example 2
def lookupRenderMethod(self, name):
"""
Look up and return the named render method.
"""
method = renderer.get(self, name, None)
if method is None:
raise MissingRenderMethod(self, name)
return method