'The Janitor produces string representations of delayed calls from the
delayed call cleanup method. It gets the string representations
*before* cancelling the calls; this is important because cancelling the
call removes critical debugging information from the string
representation.'

def test_cleanPendingReturnsDelayedCallStrings(self):

    delayedCall = DelayedCall(300, (lambda : None), (), {}, (lambda x: None), (lambda x: None), seconds=(lambda : 0))
    delayedCallString = str(delayedCall)
    reactor = StubReactor([delayedCall])
    jan = _Janitor(None, None, reactor=reactor)
    strings = jan._cleanPending()
    self.assertEqual(strings, [delayedCallString])
