mirror of
https://github.com/python/cpython.git
synced 2025-08-27 12:16:04 +00:00
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.
This commit is contained in:
parent
0cb431c071
commit
a1a68521db
2 changed files with 11 additions and 13 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue