'L{ftp.DTPFactory.setTimeout} uses the reactor passed to its initializer
to set up a timed event to time out the DTP setup after the specified
number of seconds.'

def test_setTimeout(self):

    finished = []
    d = self.assertFailure(self.factory.deferred, ftp.PortConnectionError)
    d.addCallback(finished.append)
    self.factory.setTimeout(6)
    self.reactor.advance(5)
    self.assertFalse(finished)
    self.reactor.advance(1)
    self.assertTrue(finished)
    self.assertFalse(self.reactor.calls)
