'A custom translation function can handle a L{defer.Deferred} with a
custom cancellation function.'

def test_providedCancelCalledBeforeTimeoutCustom(self):

    clock = Clock()
    d = defer.Deferred((lambda c: c.errback(ValueError('what!'))))
    d.addTimeout(10, clock, onTimeoutCancel=_overrideFunc)
    self.assertNoResult(d)
    clock.advance(15)
    self.assertEqual('OVERRIDDEN', self.successResultOf(d))
