def assertWrapperExceptionTypes(self, deferred, mainType, reasonTypes):
    def cbFailed(err):
        for reason, type in zip(err.reasons, reasonTypes):
            reason.trap(type)
        self.assertEqual(len(err.reasons), len(reasonTypes),
                         "len(%s) != len(%s)" % (err.reasons, reasonTypes))
        return err
    d = self.assertFailure(deferred, mainType)
    d.addCallback(cbFailed)
    return d
Assert that the given L{Deferred} fails with the exception given by
dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/web/test/test_newclient.py/assertWrapperExceptionTypes