def test_serializeCharRef(self):
        """
        A character reference is flattened to a string using the I{&#NNNN;}
        syntax.
        """
        ref = CharRef(ord(u"\N{SNOWMAN}"))
        return self.assertFlattensTo(ref, b"&#9731;")

        A character reference is flattened to a string using the I{&#NNNN;}
        syntax.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/test/test_flatten.py