Example #1
0
 def _create_ssh_client(self):
     client = SSHClient('localhost', prompt='$ ')
     self._login_client(client)
     return client
 def test_login_close_and_login_again(self):
     s = SSHClient('localhost', prompt='$ ')
     s.login('test', 'test')
     s.execute_command('ls')
     s.close()
     s.login('test', 'test')
     s.execute_command('ls')
Example #3
0
 def test_read_until_regexp_with_prefix(self):
     s = SSHClient('localhost', prompt='$ ')
     s.login('test', 'test')
     s.write('faa')
     s.read_until_regexp_with_prefix(r'foo\sfaa', 'foo ')
     s.close()
Example #4
0
 def test_login_close_and_login_again(self):
     s = SSHClient('localhost', prompt='$ ')
     s.login('test', 'test')
     s.execute_command('ls')
     s.close()
     s.login('test', 'test')
     s.execute_command('ls')
Example #5
0
 def test_read_until_regexp_with_prefix(self):
     s = SSHClient('localhost', prompt='$ ')
     s.login('test', 'test')
     s.write('faa')
     s.read_until_regexp_with_prefix(r'foo\sfaa', 'foo ')
     s.close()