Esempio n. 1
0
 def test_client_wait_finished_timeout(self):
     client = SSHClient(self.host,
                        port=self.port,
                        pkey=self.user_key,
                        num_retries=1,
                        timeout=0.6)
     chan = client.execute('sleep 1')
     self.assertRaises(Timeout, client.wait_finished, chan)
Esempio n. 2
0
 def scope_killer():
     for _ in range(5):
         client = SSHClient(self.host,
                            port=self.port,
                            pkey=self.user_key,
                            num_retries=1,
                            allow_agent=False)
         channel = client.execute(self.cmd)
         output = list(client.read_output(channel))
         self.assertListEqual(output, [b'me'])