]> granicus.if.org Git - python/commitdiff
Whitespace normalization broke test_cgi, because a line
authorTim Peters <tim.peters@gmail.com>
Thu, 10 Aug 2006 23:22:13 +0000 (23:22 +0000)
committerTim Peters <tim.peters@gmail.com>
Thu, 10 Aug 2006 23:22:13 +0000 (23:22 +0000)
of quoted test data relied on preserving a single trailing
blank.  Changed the string from raw to regular, and forced
in the trailing blank via an explicit \x20 escape.

Lib/test/test_cgi.py

index 7789fc83bca82836c80e46b7823843c9bb06c5b6..557f4dc0ce492a275626d0a717abb65ac9a35bf3 100644 (file)
@@ -241,7 +241,7 @@ def main():
 
     print "Test basic FieldStorage multipart parsing"
     env = {'REQUEST_METHOD':'POST', 'CONTENT_TYPE':'multipart/form-data; boundary=---------------------------721837373350705526688164684', 'CONTENT_LENGTH':'558'}
-    postdata = r"""-----------------------------721837373350705526688164684
+    postdata = """-----------------------------721837373350705526688164684
 Content-Disposition: form-data; name="id"
 
 1234
@@ -258,7 +258,7 @@ Testing 123.
 -----------------------------721837373350705526688164684
 Content-Disposition: form-data; name="submit"
 
- Add
+ Add\x20
 -----------------------------721837373350705526688164684--
 """
     fs = cgi.FieldStorage(fp=StringIO(postdata), environ=env)