1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
From 1324b09b661aaac7d4cdc7e1e9d49e1c3851db2c Mon Sep 17 00:00:00 2001
From: Martin Weinelt <hexa@darmstadt.ccc.de>
Date: Sun, 21 Apr 2024 13:05:45 +0200
Subject: [PATCH] Fix test_ftp mime type expectation on 3.11+
Closes: #94
---
test/test_urllib2.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/test_urllib2.py b/test/test_urllib2.py
index e9b96fd..c46a2fc 100644
--- a/test/test_urllib2.py
+++ b/test/test_urllib2.py
@@ -864,7 +864,7 @@ def connect_ftp(self, user, passwd, host, port, dirs, timeout):
["foo", "bar"], _sockettimeout._GLOBAL_DEFAULT_TIMEOUT, "", None),
("ftp://localhost/baz.gif;type=a", "localhost", ftplib.FTP_PORT,
"A", [], _sockettimeout._GLOBAL_DEFAULT_TIMEOUT, "baz.gif",
- None), # TODO: really this should guess image/gif
+ "image/gif" if sys.version_info >= (3, 11) else None),
]:
req = Request(url, timeout=timeout)
r = h.ftp_open(req)
|