[Python-checkins] CVS: python/dist/src/Lib/test test_urllib.py,1.6,1.7
Skip Montanaro
montanaro@users.sourceforge.net
Sat, 20 Jan 2001 12:22:32 -0800
- Previous message: [Python-checkins] CVS: python/dist/src/Lib BaseHTTPServer.py,1.12,1.13 Bastion.py,1.5,1.6 CGIHTTPServer.py,1.14,1.15 ConfigParser.py,1.26,1.27 Cookie.py,1.5,1.6 MimeWriter.py,1.5,1.6 Queue.py,1.12,1.13 SimpleHTTPServer.py,1.13,1.14 SocketServer.py,1.22,1.23 StringIO.py,1.15,1.16 UserDict.py,1.9,1.10 UserList.py,1.14,1.15 UserString.py,1.8,1.9 aifc.py,1.39,1.40 anydbm.py,1.8,1.9 atexit.py,1.2,1.3 audiodev.py,1.10,1.11 base64.py,1.10,1.11 bdb.py,1.28,1.29 binhex.py,1.17,1.18 bisect.py,1.5,1.6 calendar.py,1.20,1.21 cgi.py,1.58,1.59 chunk.py,1.6,1.7 cmd.py,1.19,1.20 code.py,1.13,1.14 codecs.py,1.15,1.16 codeop.py,1.1,1.2 colorsys.py,1.4,1.5 commands.py,1.14,1.15 compileall.py,1.7,1.8 copy.py,1.18,1.19 copy_reg.py,1.4,1.5 dbhash.py,1.3,1.4 dircache.py,1.7,1.8 dis.py,1.29,1.30 robotparser.py,1.4,1.5
- Next message: [Python-checkins] CVS: python/dist/src/Lib/test test___all__.py,1.1,1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv13641
Modified Files:
test_urllib.py
Log Message:
added some tests for urlencode
Index: test_urllib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_urllib.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** test_urllib.py 2001/01/19 07:00:08 1.6
--- test_urllib.py 2001/01/20 20:22:30 1.7
***************
*** 35,36 ****
--- 35,52 ----
verify(urllib.quote(in2) == out2_1, "urllib.quote problem 4")
verify(urllib.quote(in2, '?') == out2_2, "urllib.quote problem 5")
+
+ in3 = {"p1":"v1","p2":"v2"}
+ exp3_1 = "p2=v2&p1=v1"
+ exp3_2 = "p1=v1&p2=v2"
+ act3 = urllib.urlencode(in3)
+ verify(act3==exp3_1 or act3==exp3_2, "urllib.urlencode problem 1")
+
+ in4 = {"p1":["v1","v2"]}
+ exp4 = "p1=v1&p1=v2"
+ act4 = urllib.urlencode(in4,doseq=1)
+ verify(act4==exp4, "urllib.urlencode problem 2")
+
+ in5 = in4
+ exp5 = "p1=%5B%27v1%27%2C+%27v2%27%5D"
+ act5 = urllib.urlencode(in5)
+ verify(act5==exp5, "urllib.urlencode problem 3")
- Previous message: [Python-checkins] CVS: python/dist/src/Lib BaseHTTPServer.py,1.12,1.13 Bastion.py,1.5,1.6 CGIHTTPServer.py,1.14,1.15 ConfigParser.py,1.26,1.27 Cookie.py,1.5,1.6 MimeWriter.py,1.5,1.6 Queue.py,1.12,1.13 SimpleHTTPServer.py,1.13,1.14 SocketServer.py,1.22,1.23 StringIO.py,1.15,1.16 UserDict.py,1.9,1.10 UserList.py,1.14,1.15 UserString.py,1.8,1.9 aifc.py,1.39,1.40 anydbm.py,1.8,1.9 atexit.py,1.2,1.3 audiodev.py,1.10,1.11 base64.py,1.10,1.11 bdb.py,1.28,1.29 binhex.py,1.17,1.18 bisect.py,1.5,1.6 calendar.py,1.20,1.21 cgi.py,1.58,1.59 chunk.py,1.6,1.7 cmd.py,1.19,1.20 code.py,1.13,1.14 codecs.py,1.15,1.16 codeop.py,1.1,1.2 colorsys.py,1.4,1.5 commands.py,1.14,1.15 compileall.py,1.7,1.8 copy.py,1.18,1.19 copy_reg.py,1.4,1.5 dbhash.py,1.3,1.4 dircache.py,1.7,1.8 dis.py,1.29,1.30 robotparser.py,1.4,1.5
- Next message: [Python-checkins] CVS: python/dist/src/Lib/test test___all__.py,1.1,1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]