'A L{defer.Deferred} without a canceller, when cancelled must allow
a single extra call to errback, and raise
L{defer.AlreadyCalledError} if callbacked or errbacked thereafter.'

def test_raisesAfterCancelAndErrback(self):

    d = defer.Deferred()
    d.addCallbacks(self._callback, self._errback)
    d.cancel()
    d.errback(Exception())
    self.assertRaises(defer.AlreadyCalledError, d.callback, None)
    self.assertRaises(defer.AlreadyCalledError, d.errback, Exception())
