Exemple #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')
Exemple #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()
Exemple #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')
 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()