We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 32641e1 commit e7a2f76Copy full SHA for e7a2f76
tests/test_future/test_urllib2.py
@@ -691,10 +691,6 @@ def connect_ftp(self, user, passwd, host, port, dirs,
691
h = NullFTPHandler(data)
692
h.parent = MockOpener()
693
694
- # MIME guessing works in Python 3.8!
695
- guessed_mime = None
696
- if sys.hexversion >= 0x03080000:
697
- guessed_mime = "image/gif"
698
for url, host, port, user, passwd, type_, dirs, filename, mimetype in [
699
("ftp://localhost/foo/bar/baz.html",
700
"localhost", ftplib.FTP_PORT, "", "", "I",
@@ -713,7 +709,10 @@ def connect_ftp(self, user, passwd, host, port, dirs,
713
709
["foo", "bar"], "", None),
714
710
("ftp://localhost/baz.gif;type=a",
715
711
"localhost", ftplib.FTP_PORT, "", "", "A",
716
- [], "baz.gif", guessed_mime),
712
+ [], "baz.gif", None),
+ ("ftp://localhost/baz.gif",
+ "localhost", ftplib.FTP_PORT, "", "", "I",
+ [], "baz.gif", "image/gif"),
717
]:
718
req = Request(url)
719
req.timeout = None
0 commit comments