[downloader:http] skip files not passing filesize-min/-max (#4821)

instead of failing the download
This commit is contained in:
Mike Fährmann
2023-11-17 15:56:00 +01:00
parent 6c040afe0f
commit ea78f67860
2 changed files with 8 additions and 4 deletions

View File

@@ -214,7 +214,8 @@ class TestHTTPDownloader(TestDownloaderBase):
self.downloader.minsize = 100
with self.assertLogs(self.downloader.log, "WARNING"):
success = self.downloader.download(url, pathfmt)
self.assertFalse(success)
self.assertTrue(success)
self.assertEqual(pathfmt.temppath, "")
def test_http_filesize_max(self):
url = self.address + "/jpg"
@@ -222,7 +223,8 @@ class TestHTTPDownloader(TestDownloaderBase):
self.downloader.maxsize = 100
with self.assertLogs(self.downloader.log, "WARNING"):
success = self.downloader.download(url, pathfmt)
self.assertFalse(success)
self.assertTrue(success)
self.assertEqual(pathfmt.temppath, "")
class TestTextDownloader(TestDownloaderBase):