summaryrefslogtreecommitdiff
path: root/Lib/test/test_urllibnet.py
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2008-06-12 04:06:45 +0000
committerBarry Warsaw <barry@python.org>2008-06-12 04:06:45 +0000
commit67ff650a9245a7a225e0e7b5b1761bea1f99f57e (patch)
tree868598a4a26c5d5581a5196c55eb2da9eed1a71b /Lib/test/test_urllibnet.py
parentecced7d025f5f8e80fa34c56bc3e99bb1cbde661 (diff)
downloadcpython-67ff650a9245a7a225e0e7b5b1761bea1f99f57e.tar.gz
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 6c2632c55a..d4831d8708 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")