'When a L{H2Connection} loses its connection it cancels its timeout.'

def test_noTimeoutIfConnectionLost(self):

    frameFactory = FrameFactory()
    frames = buildRequestFrames(self.getRequestHeaders, [], frameFactory)
    initialData = frameFactory.clientConnectionPreface()
    initialData += ''.join((f.serialize() for f in frames))
    (reactor, conn, transport) = self.initiateH2Connection(initialData, requestFactory=DummyProducerHandler)
    sentData = transport.value()
    oldCallCount = len(reactor.getDelayedCalls())
    conn.connectionLost('reason')
    currentCallCount = len(reactor.getDelayedCalls())
    self.assertEqual((oldCallCount - 1), currentCallCount)
    reactor.advance(101)
    self.assertEqual(transport.value(), sentData)
