'A L{defer.Deferred} without a canceller, when cancelled and then
errbacked, ignores multiple cancels thereafter.'

def test_noCancellerMultipleCancelsAfterCancelAndErrback(self):

    d = defer.Deferred()
    d.addCallbacks(self._callback, self._errback)
    d.cancel()
    self.assertEqual(self.errbackResults.type, defer.CancelledError)
    currentFailure = self.errbackResults
    d.errback(GenericError())
    self.assertEqual(self.errbackResults.type, defer.CancelledError)
    d.cancel()
    self.assertIs(currentFailure, self.errbackResults)
