def test_render(self):
        """
        L{Element.render} loads a document from the C{loader} attribute and
        returns it.
        """
        class TemplateLoader(object):
            def load(self):
                return "result"

        class StubElement(Element):
            loader = TemplateLoader()

        element = StubElement()
        self.assertEqual(element.render(None), "result")

        L{Element.render} loads a document from the C{loader} attribute and
        returns it.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/test/test_template.py