diff options
| author | 2025-07-31 01:22:01 -0400 | |
|---|---|---|
| committer | 2025-07-31 01:22:01 -0400 | |
| commit | a6e995c093de8aae2e91a0787281bb34c0b871eb (patch) | |
| tree | 2d79821b05300d34d8871eb6c9662b359a2de85d /test/test_downloader.py | |
| parent | 7672a750cb74bf31e21d76aad2776367fd476155 (diff) | |
New upstream version 1.30.2.upstream/1.30.2
Diffstat (limited to 'test/test_downloader.py')
| -rw-r--r-- | test/test_downloader.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/test/test_downloader.py b/test/test_downloader.py index 5a9a20b..3e5bf84 100644 --- a/test/test_downloader.py +++ b/test/test_downloader.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- -# Copyright 2018-2022 Mike Fährmann +# Copyright 2018-2025 Mike Fährmann # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as @@ -163,7 +163,7 @@ class TestDownloaderConfig(unittest.TestCase): self.assertEqual(dl.timeout, 10) self.assertEqual(dl.verify, False) self.assertEqual(dl.mtime, False) - self.assertEqual(dl.rate, 42) + self.assertEqual(dl.rate(), 42) self.assertEqual(dl.part, False) @@ -332,7 +332,7 @@ class HttpRequestHandler(http.server.BaseHTTPRequestHandler): status = 206 match = re.match(r"bytes=(\d+)-", self.headers["Range"]) - start = int(match.group(1)) + start = int(match[1]) headers["Content-Range"] = "bytes {}-{}/{}".format( start, len(output)-1, len(output)) @@ -369,6 +369,8 @@ SAMPLES = { ("heic", b"????ftypheis"), ("heic", b"????ftypheix"), ("svg" , b"<?xml"), + ("html", b"<!DOCTYPE html><html>...</html>"), + ("html", b" \n \n\r\t\n <!DOCTYPE html><html>...</html>"), ("ico" , b"\x00\x00\x01\x00"), ("cur" , b"\x00\x00\x02\x00"), ("psd" , b"8BPS"), |
