'The ping timeout is cancelled if the remote connection is lost.'

def test_timeout_cancelled_on_lost_connection(self):

    reactor = Clock()
    protocol = self.build_protocol(reactor)
    transport = StringTransportWithAbort()
    protocol.makeConnection(transport)
    protocol.connectionLost(Failure(ConnectionDone('test,    simulated')))
    reactor.advance((PING_INTERVAL.total_seconds() * 3))
