def assertFlattensTo(self, root, target):
        """
        Assert that a root element, when flattened, is equal to a string.
        """
        d = flattenString(None, root)
        d.addCallback(lambda s: self.assertEqual(s, target))
        return d

        Assert that a root element, when flattened, is equal to a string.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/test/_util.py