'Calling cancel multiple times on a deferred with no canceller
results in a L{defer.CancelledError}. Subsequent calls to cancel
do not cause an error.'

def test_noCancellerMultipleCancel(self):

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