'When cancelling an unfired L{defer.DeferredList} with the flag
C{fireOnOneCallback} set, if one of the L{defer.Deferred} callbacks
in its canceller, the L{defer.DeferredList} will callback with the
result and the index of the L{defer.Deferred} in a C{tuple}.'

def test_cancelDeferredListWithFireOnOneCallbackAndDeferredCallback(self):

    deferredOne = defer.Deferred(fakeCallbackCanceller)
    deferredTwo = defer.Deferred()
    deferredList = defer.DeferredList([deferredOne, deferredTwo], fireOnOneCallback=True)
    deferredList.cancel()
    self.failureResultOf(deferredTwo, defer.CancelledError)
    result = self.successResultOf(deferredList)
    self.assertEqual(result, ('Callback    Result', 0))
