Patch for issue 2848, mostly by Humberto Diogenes, with a couple of

small fixes by Barry.  This removes mimetools from the stdlib.
This commit is contained in:
Barry Warsaw 2008-06-12 04:06:45 +00:00
parent 75f25f2c9a
commit 820c120059
23 changed files with 146 additions and 202 deletions

View file

@ -1,6 +1,6 @@
#!/usr/bin/env python
import mimetools
import email
import threading
import urlparse
import urllib2
@ -443,10 +443,10 @@ class TestUrlopen(unittest.TestCase):
try:
open_url = urllib2.urlopen("http://localhost:%s" % handler.port)
info_obj = open_url.info()
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(), "plain")
"email.message.Message")
self.assertEqual(info_obj.get_content_subtype(), "plain")
finally:
self.server.stop()