[Python-checkins] CVS: python/dist/src/Lib/test test_cgi.py,1.2,1.3

Jeremy Hylton python-dev@python.org
Fri, 15 Sep 2000 13:06:59 -0700


Update of /cvsroot/python/python/dist/src/Lib/test
In directory slayer.i.sourceforge.net:/tmp/cvs-serv17517/Lib/test

Modified Files:
	test_cgi.py 
Log Message:
fix bug #110661 (PR#356) -- accept either & or ; as separator for CGI
    query string  
also some doc string reformatting and use of string methods instead of
    older string.splitfields


Index: test_cgi.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_cgi.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** test_cgi.py	2000/08/25 21:47:56	1.2
--- test_cgi.py	2000/09/15 20:06:57	1.3
***************
*** 59,65 ****
--- 59,68 ----
      ("&", ValueError("bad query field: ''")),
      ("&&", ValueError("bad query field: ''")),
+     (";", ValueError("bad query field: ''")),
+     (";&;", ValueError("bad query field: ''")),
      # Should the next few really be valid?
      ("=", {}),
      ("=&=", {}),
+     ("=;=", {}),
      # This rest seem to make sense
      ("=a", {'': ['a']}),
***************
*** 76,79 ****
--- 79,84 ----
      ("a=a+b&a=b+a", {'a': ['a b', 'b a']}),
      ("x=1&y=2.0&z=2-3.%2b0", {'x': ['1'], 'y': ['2.0'], 'z': ['2-3.+0']}),
+     ("x=1;y=2.0&z=2-3.%2b0", {'x': ['1'], 'y': ['2.0'], 'z': ['2-3.+0']}),
+     ("x=1;y=2.0;z=2-3.%2b0", {'x': ['1'], 'y': ['2.0'], 'z': ['2-3.+0']}),
      ("Hbc5161168c542333633315dee1182227:key_store_seqid=400006&cuyer=r&view=bustomer&order_id=0bb2e248638833d48cb7fed300000f1b&expire=964546263&lobale=en-US&kid=130003.300038&ss=env",
       {'Hbc5161168c542333633315dee1182227:key_store_seqid': ['400006'],