diff options
author | Guido van Rossum <guido@python.org> | 2007-08-28 03:11:34 +0000 |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-08-28 03:11:34 +0000 |
commit | a1a68521db007c55668ed7d7c31fb629804105a8 (patch) | |
tree | 09425841f2504c5e02fca31ab2a0fc1ee52cc67b /Lib/test/test_cgi.py | |
parent | 0cb431c071ce2167f262916bb467ec8cb9ea097a (diff) | |
download | cpython-git-a1a68521db007c55668ed7d7c31fb629804105a8.tar.gz |
Make test_cgi pass. I changed the internal file created by make_file()
to be a text file. (XXX It should use UTF-8 as the encoding.)
I also removed the unised 'binary' argument from the make_file() signature.
XXX I am under no illusion that this is now working; I're pretty sure
it would be more principled if it always read binary data. But that's
for someone who actually cares about this module.
Diffstat (limited to 'Lib/test/test_cgi.py')
-rw-r--r-- | Lib/test/test_cgi.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_cgi.py b/Lib/test/test_cgi.py index 9b3df216d7..439982bf45 100644 --- a/Lib/test/test_cgi.py +++ b/Lib/test/test_cgi.py @@ -231,8 +231,8 @@ class CgiTests(unittest.TestCase): setattr(self, name, a) return a - f = TestReadlineFile(tempfile.TemporaryFile()) - f.write(b'x' * 256 * 1024) + f = TestReadlineFile(tempfile.TemporaryFile("w+")) + f.write('x' * 256 * 1024) f.seek(0) env = {'REQUEST_METHOD':'PUT'} fs = cgi.FieldStorage(fp=f, environ=env) |