コード例 #1
0
 def _create_ssh_client(self):
     client = SSHClient('localhost', prompt='$ ')
     self._login_client(client)
     return client
コード例 #2
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')
コード例 #3
0
ファイル: test_client_api.py プロジェクト: ponkar/SSHLibrary
 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()
コード例 #4
0
ファイル: test_client_api.py プロジェクト: ponkar/SSHLibrary
 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')
コード例 #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()