def test_elementContainingStaticElement(self):
        """
        An Element which is returned by the render method of another Element is
        rendered properly.
        """
        class RenderfulElement(Element):
            @renderer
            def renderMethod(self, request, tag):
                return tag(Element(
                    loader=XMLString("<em>Hello, world.</em>")))
        element = RenderfulElement(loader=XMLString("""
        <p xmlns:t="http://twistedmatrix.com/ns/twisted.web.template/0.1"
          t:render="renderMethod" />
        """))
        return self.assertFlattensTo(element, b"<p><em>Hello, world.</em></p>")

        An Element which is returned by the render method of another Element is
        rendered properly.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/test/test_template.py