'@param failure: A L{twisted.python.failure.Failure}.
@return: C{True} if C{failure} is expected, C{False} otherwise.'

def expected(self, failure):

    if (self.errors is None):
        return True
    for error in self.errors:
        if failure.check(error):
            return True
    return False
