[Python-checkins] python/dist/src/Lib/test test_urllib2.py, 1.19, 1.19.2.1

birkenfeld@users.sourceforge.net birkenfeld at users.sourceforge.net
Thu Aug 25 00:20:56 CEST 2005


Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24127/Lib/test

Modified Files:
      Tag: release24-maint
	test_urllib2.py 
Log Message:
Backport bug #735248: fix urllib2.parse_http_list().



Index: test_urllib2.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_urllib2.py,v
retrieving revision 1.19
retrieving revision 1.19.2.1
diff -u -d -r1.19 -r1.19.2.1
--- test_urllib2.py	7 Aug 2004 17:40:50 -0000	1.19
+++ test_urllib2.py	24 Aug 2005 22:20:46 -0000	1.19.2.1
@@ -41,6 +41,14 @@
         buf = f.read()
         f.close()
 
+    def test_parse_http_list(self):
+        tests = [('a,b,c', ['a', 'b', 'c']),
+                 ('path"o,l"og"i"cal, example', ['path"o,l"og"i"cal', 'example']),
+                 ('a, b, "c", "d", "e,f", g, h', ['a', 'b', '"c"', '"d"', '"e,f"', 'g', 'h']),
+                 ('a="b\\"c", d="e\\,f", g="h\\\\i"', ['a="b"c"', 'd="e,f"', 'g="h\\i"'])]
+        for string, list in tests:
+            self.assertEquals(urllib2.parse_http_list(string), list)
+
 
 class MockOpener:
     addheaders = []



More information about the Python-checkins mailing list