def testConnectTimeout(self):
        n, f, a, kw = self.scheduled.pop()
        self.failIf(self.scheduled, "Too many tasks scheduled.")

        self.assertEquals(n, self.connectTimeout)
        f(*a, **kw)

        self.assertEquals(len(self.events), 1)
        self.events[0].trap(athena.ConnectFailed)

        self.failIf(self.scheduled, "Unexpected task scheduled after connect failed.")
Test that a connection timeout is set up which, if allowed to expire,
dataset/ETHPy150Open twisted/nevow/nevow/test/test_athena.py/Transport.testConnectTimeout