def test_attrRendering(self):
        """
        An Element with an attr tag renders the vaule of its attr tag as an
        attribute of its containing tag.
        """
        element = Element(loader=XMLString(
            '<a xmlns:t="http://twistedmatrix.com/ns/twisted.web.template/0.1">'
            '<t:attr name="href">http://example.com</t:attr>'
            'Hello, world.'
            '</a>'
        ))
        return self.assertFlattensTo(element,
            b'<a href="http://example.com">Hello, world.</a>')

        An Element with an attr tag renders the vaule of its attr tag as an
        attribute of its containing tag.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/test/test_template.py