Пример #1
0
 def test_http_list_dateregexp(self):
     self.config.set('http.parse.file.date.format', "%%d-%%b-%%Y %%H:%%M")
     httpd = HTTPDownload('http', 'ftp2.fr.debian.org', '/debian/dists/',
                          self.config)
     (file_list, dir_list) = httpd.list()
     httpd.close()
     self.assertTrue(len(file_list) == 1)
Пример #2
0
 def test_http_download_in_subdir(self):
     httpd = HTTPDownload('http', 'ftp2.fr.debian.org', '/debian/',
                          self.config)
     (file_list, dir_list) = httpd.list()
     httpd.match([r'^dists/README$'], file_list, dir_list)
     httpd.download(self.utils.data_dir)
     httpd.close()
     self.assertTrue(len(httpd.files_to_download) == 1)
Пример #3
0
 def test_http_list(self):
     httpd = HTTPDownload('http', 'ftp2.fr.debian.org', '/debian/dists/',
                          self.config)
     (file_list, dir_list) = httpd.list()
     httpd.close()
     self.assertTrue(len(file_list) == 1)