summaryrefslogtreecommitdiffstats
path: root/test/test_downloader.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_downloader.py')
-rw-r--r--test/test_downloader.py8
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"),