diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-05 09:06:10 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-05 09:06:10 +0000 |
commit | 137f07c27a88b07df57df5b2cdebebe3c7722bac (patch) | |
tree | 4ebdcbea6b540f69c40ba0be6ac766008030d149 /test/test_downloader_http.py | |
parent | Adding debian version 2024.05.27-1. (diff) | |
download | yt-dlp-137f07c27a88b07df57df5b2cdebebe3c7722bac.tar.xz yt-dlp-137f07c27a88b07df57df5b2cdebebe3c7722bac.zip |
Merging upstream version 2024.07.01.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/test_downloader_http.py')
-rw-r--r-- | test/test_downloader_http.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/test_downloader_http.py b/test/test_downloader_http.py index 099ec2f..faba0bc 100644 --- a/test/test_downloader_http.py +++ b/test/test_downloader_http.py @@ -38,9 +38,9 @@ class HTTPTestRequestHandler(http.server.BaseHTTPRequestHandler): end = int(mobj.group(2)) valid_range = start is not None and end is not None if valid_range: - content_range = 'bytes %d-%d' % (start, end) + content_range = f'bytes {start}-{end}' if total: - content_range += '/%d' % total + content_range += f'/{total}' self.send_header('Content-Range', content_range) return (end - start + 1) if valid_range else total @@ -84,7 +84,7 @@ class TestHttpFD(unittest.TestCase): filename = 'testfile.mp4' try_rm(encodeFilename(filename)) self.assertTrue(downloader.real_download(filename, { - 'url': 'http://127.0.0.1:%d/%s' % (self.port, ep), + 'url': f'http://127.0.0.1:{self.port}/{ep}', }), ep) self.assertEqual(os.path.getsize(encodeFilename(filename)), TEST_SIZE, ep) try_rm(encodeFilename(filename)) |