def test_get(self): with temporary_file() as temp_filename: sftp = SFTPClient('localhost', port=2222, username='******', password='******') sftp.get_file_from_uri(remotepath='/vagrant/Vagrantfile', localpath=temp_filename, contact_email=None) self.assertFalse(os.stat(temp_filename)[6] == 0)
def test_import_statements(self): """Tests to make sure all the modules were imported correctly""" class Props(object): pass logging.basicConfig(level=1000) sftp = SFTPClient('fake-hostname--dot-com') props = EmailProps('fake-hostname--dot-com', 22, 'get@me', []) sftp.get_file_from_uri('/path/does/not/exist', '/path/no/good', props)
def test_import_statements(self): """Tests to make sure all the modules were imported correctly""" class Props(object): pass logging.basicConfig(level=1000) sftp = SFTPClient('fake-hostname--dot-com') props = EmailProps('fake-hostname--dot-com', 22, 'get@me', []) sftp.get_file_from_uri('/path/does/not/exist', '/path/no/good', props)
def test_get(self): with temporary_file() as temp_filename: sftp = SFTPClient('localhost', port=2222, username='******', password='******') sftp.get_file_from_uri(remote_path='/vagrant/Vagrantfile', local_path=temp_filename, props=None) self.assertFalse(os.stat(temp_filename)[6] == 0)