

def assertFlatteningRaises(self, root, exn):
    '\n        Assert flattening a root element raises a particular exception.\n        '
    d = self.assertFailure(self.assertFlattensTo(root, b''), FlattenerError)
    d.addCallback((lambda exc: self.assertIsInstance(exc._exception, exn)))
    return d

dataset/ETHPy150Open twisted/twisted/twisted/web/test/_util.py FlattenTestCase.assertFlatteningRaises/original