def _cancelConnectFailedTimeoutTest(self, connect):
        reactor = MemoryReactorWithConnectorsAndTime()
        cc = ClientCreator(reactor, Protocol)
        d, factory = connect(reactor, cc)
        connector = reactor.connectors.pop()
        factory.clientConnectionFailed(
            connector, Failure(Exception("Simulated failure")))

        # Sanity check - there is an outstanding delayed call to fire the
        # Deferred.
        self.assertEquals(len(reactor.getDelayedCalls()), 1)

        # Cancel the Deferred, cancelling the delayed call.
        d.cancel()

        self.assertEquals(reactor.getDelayedCalls(), [])

        return self.assertFailure(d, CancelledError)
Like L{_cancelConnectTest}, but for the case where the L{Deferred} is
dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/internet/test/test_protocol.py/ClientCreatorTests._cancelConnectFailedTimeoutTest