diff options
author | Georg Brandl <georg@python.org> | 2006-03-28 12:40:24 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2006-03-28 12:40:24 (GMT) |
commit | f1349cd05d31ba0a925d9931a7c437a9650c6488 (patch) | |
tree | 1c104179ce784202c1d3cdfdef34d8680ecfc5c6 /Lib/test/test_urllib2.py | |
parent | 240ec6b9efc2d9d9a23ee76383051acc2df9e074 (diff) | |
download | cpython-f1349cd05d31ba0a925d9931a7c437a9650c6488.zip cpython-f1349cd05d31ba0a925d9931a7c437a9650c6488.tar.gz cpython-f1349cd05d31ba0a925d9931a7c437a9650c6488.tar.bz2 |
Bug #1459963: urllib2 now normalizes HTTP header names correctly
with title().
Diffstat (limited to 'Lib/test/test_urllib2.py')
-rw-r--r-- | Lib/test/test_urllib2.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/test/test_urllib2.py b/Lib/test/test_urllib2.py index 5710444..8d1363d 100644 --- a/Lib/test/test_urllib2.py +++ b/Lib/test/test_urllib2.py @@ -493,11 +493,11 @@ class HandlerTests(unittest.TestCase): r = MockResponse(200, "OK", {}, "") newreq = h.do_request_(req) if data is None: # GET - self.assert_("Content-length" not in req.unredirected_hdrs) - self.assert_("Content-type" not in req.unredirected_hdrs) + self.assert_("Content-Length" not in req.unredirected_hdrs) + self.assert_("Content-Type" not in req.unredirected_hdrs) else: # POST - self.assertEqual(req.unredirected_hdrs["Content-length"], "0") - self.assertEqual(req.unredirected_hdrs["Content-type"], + self.assertEqual(req.unredirected_hdrs["Content-Length"], "0") + self.assertEqual(req.unredirected_hdrs["Content-Type"], "application/x-www-form-urlencoded") # XXX the details of Host could be better tested self.assertEqual(req.unredirected_hdrs["Host"], "example.com") @@ -509,8 +509,8 @@ class HandlerTests(unittest.TestCase): req.add_unredirected_header("Host", "baz") req.add_unredirected_header("Spam", "foo") newreq = h.do_request_(req) - self.assertEqual(req.unredirected_hdrs["Content-length"], "foo") - self.assertEqual(req.unredirected_hdrs["Content-type"], "bar") + self.assertEqual(req.unredirected_hdrs["Content-Length"], "foo") + self.assertEqual(req.unredirected_hdrs["Content-Type"], "bar") self.assertEqual(req.unredirected_hdrs["Host"], "baz") self.assertEqual(req.unredirected_hdrs["Spam"], "foo") |