'When cancelling an unfired L{defer.DeferredList} with the flag
C{fireOnOneErrback} set, cancel every L{defer.Deferred} in the list.'

def test_cancelDeferredListWithFireOnOneErrback(self):

    deferredOne = defer.Deferred()
    deferredTwo = defer.Deferred()
    deferredList = defer.DeferredList([deferredOne, deferredTwo], fireOnOneErrback=True)
    deferredList.cancel()
    self.failureResultOf(deferredOne, defer.CancelledError)
    self.failureResultOf(deferredTwo, defer.CancelledError)
    deferredListFailure = self.failureResultOf(deferredList, defer.FirstError)
    firstError = deferredListFailure.value
    self.assertTrue(firstError.subFailure.check(defer.CancelledError))
