1#!/usr/bin/python 2# Copyright 2016 The Chromium OS Authors. All rights reserved. 3# Use of this source code is governed by a BSD-style license that can be 4# found in the LICENSE file. 5 6import unittest 7 8import common 9 10from autotest_lib.server.hosts import ssh_multiplex 11 12 13class ConnectionPoolTest(unittest.TestCase): 14 """ Test for SSH Connection Pool """ 15 def test_get(self): 16 """ We can get MasterSsh object for a host from the pool """ 17 p = ssh_multiplex.ConnectionPool() 18 conn1 = p.get('host', 'user', 22) 19 self.assertIsNotNone(conn1) 20 21 conn2 = p.get('host', 'user', 22) 22 self.assertEquals(conn1, conn2) 23 24 25if __name__ == '__main__': 26 unittest.main() 27