'During pending-call cleanup, the janitor cancels pending timed calls.'

def test_cleanPendingCancelsCalls(self):

    def func():
        return 'Lulz'
    cancelled = []
    delayedCall = DelayedCall(300, func, (), {}, cancelled.append, (lambda x: None))
    reactor = StubReactor([delayedCall])
    jan = _Janitor(None, None, reactor=reactor)
    jan._cleanPending()
    self.assertEqual(cancelled, [delayedCall])
