def test_errorToplevelAttr(self):
        """
        A template with a toplevel C{attr} tag will not load; it will raise
        L{AssertionError} if you try.
        """
        self.assertRaises(
            AssertionError,
            XMLString,
            """<t:attr
            xmlns:t='http://twistedmatrix.com/ns/twisted.web.template/0.1'
            name='something'
            >hello</t:attr>
            """)

        A template with a toplevel C{attr} tag will not load; it will raise
        L{AssertionError} if you try.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/test/test_template.py