def test_download_in_subdir(self): ftpd = FTPDownload('ftp', 'ftp.ncbi.nih.gov', '/blast/') (file_list, dir_list) = ftpd.list() ftpd.match([r'^db/FASTA/alu.*\.gz$'], file_list, dir_list) ftpd.download(self.utils.data_dir) ftpd.close() self.assertTrue(len(ftpd.files_to_download) == 2)
def test_download(self): ftpd = FTPDownload("ftp", "ftp.ncbi.nih.gov", "/blast/db/FASTA/") (file_list, dir_list) = ftpd.list() ftpd.match([r"^alu.*\.gz$"], file_list, dir_list) ftpd.download(self.utils.data_dir) ftpd.close() self.assertTrue(len(ftpd.files_to_download) == 2)
def test_ftp_list(self): ftpd = FTPDownload('ftp', 'ftp.ncbi.nih.gov', '/blast/db/FASTA/') (file_list, dir_list) = ftpd.list() ftpd.close() self.assertTrue(len(file_list) > 1)