summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_urllibnet.py
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2008-06-12 04:06:45 (GMT)
committerBarry Warsaw <barry@python.org>2008-06-12 04:06:45 (GMT)
commit820c1200597606f95bb996586be88a3283c6448c (patch)
tree1b914ab96ccc9cd81465a6c3e765c97f128fd464 /Lib/test/test_urllibnet.py
parent75f25f2c9a4646746efbc056b4d2a07b40f93964 (diff)
downloadcpython-820c1200597606f95bb996586be88a3283c6448c.zip
cpython-820c1200597606f95bb996586be88a3283c6448c.tar.gz
cpython-820c1200597606f95bb996586be88a3283c6448c.tar.bz2
Patch for issue 2848, mostly by Humberto Diogenes, with a couple of
small fixes by Barry. This removes mimetools from the stdlib.
Diffstat (limited to 'Lib/test/test_urllibnet.py')
-rw-r--r--Lib/test/test_urllibnet.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/test/test_urllibnet.py b/Lib/test/test_urllibnet.py
index 6c2632c..d4831d8 100644
--- a/Lib/test/test_urllibnet.py
+++ b/Lib/test/test_urllibnet.py
@@ -7,7 +7,7 @@ import socket
import urllib
import sys
import os
-import mimetools
+import email.message
def _open_with_retry(func, host, *args, **kwargs):
@@ -87,10 +87,10 @@ class urlopenNetworkTests(unittest.TestCase):
info_obj = open_url.info()
finally:
open_url.close()
- self.assert_(isinstance(info_obj, mimetools.Message),
+ self.assert_(isinstance(info_obj, email.message.Message),
"object returned by 'info' is not an instance of "
- "mimetools.Message")
- self.assertEqual(info_obj.getsubtype(), "html")
+ "email.message.Message")
+ self.assertEqual(info_obj.get_content_subtype(), "html")
def test_geturl(self):
# Make sure same URL as opened is returned by geturl.
@@ -180,8 +180,8 @@ class urlretrieveNetworkTests(unittest.TestCase):
# Make sure header returned as 2nd value from urlretrieve is good.
file_location, header = self.urlretrieve("http://www.python.org/")
os.unlink(file_location)
- self.assert_(isinstance(header, mimetools.Message),
- "header is not an instance of mimetools.Message")
+ self.assert_(isinstance(header, email.message.Message),
+ "header is not an instance of email.message.Message")