Beispiel #1
0
 def test_constructor(self):
     """
     Given an C{element} argument, the L{MissingTemplateLoader} constructor
     assigns the value to the corresponding attribute.
     """
     elt = object()
     e = error.MissingTemplateLoader(elt)
     self.assertIs(e.element, elt)
Beispiel #2
0
 def test_repr(self):
     """
     A L{MissingTemplateLoader} is represented using a custom string
     containing the element's representation and the method name.
     """
     elt = object()
     e = error.MissingTemplateLoader(elt)
     self.assertEqual(repr(e), "'MissingTemplateLoader': %r had no loader" % elt)