diff options
author | Jeremy Hylton <jeremy@alum.mit.edu> | 2008-06-18 20:49:58 (GMT) |
---|---|---|
committer | Jeremy Hylton <jeremy@alum.mit.edu> | 2008-06-18 20:49:58 (GMT) |
commit | 1afc1696167547a5fa101c53e5a3ab4717f8852c (patch) | |
tree | e989e72e71530d892214562785df7e11f84c1111 /Lib/test/test_httpservers.py | |
parent | a656d2cd8984f1ecb5a7e2cd09a18f72452f2b78 (diff) | |
download | cpython-1afc1696167547a5fa101c53e5a3ab4717f8852c.zip cpython-1afc1696167547a5fa101c53e5a3ab4717f8852c.tar.gz cpython-1afc1696167547a5fa101c53e5a3ab4717f8852c.tar.bz2 |
Make a new urllib package .
It consists of code from urllib, urllib2, urlparse, and robotparser.
The old modules have all been removed. The new package has five
submodules: urllib.parse, urllib.request, urllib.response,
urllib.error, and urllib.robotparser. The urllib.request.urlopen()
function uses the url opener from urllib2.
Note that the unittests have not been renamed for the
beta, but they will be renamed in the future.
Joint work with Senthil Kumaran.
Diffstat (limited to 'Lib/test/test_httpservers.py')
-rw-r--r-- | Lib/test/test_httpservers.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/test/test_httpservers.py b/Lib/test/test_httpservers.py index 94c6a3d..0305a90 100644 --- a/Lib/test/test_httpservers.py +++ b/Lib/test/test_httpservers.py @@ -11,7 +11,7 @@ import os import sys import base64 import shutil -import urllib +import urllib.parse import http.client import tempfile import threading @@ -322,7 +322,8 @@ class CGIHTTPServerTestCase(BaseTestCase): (res.read(), res.getheader('Content-type'), res.status)) def test_post(self): - params = urllib.urlencode({'spam' : 1, 'eggs' : 'python', 'bacon' : 123456}) + params = urllib.parse.urlencode( + {'spam' : 1, 'eggs' : 'python', 'bacon' : 123456}) headers = {'Content-type' : 'application/x-www-form-urlencoded'} res = self.request('/cgi-bin/file2.py', 'POST', params, headers) |