Tests: added Python tests with encoding.

This commit is contained in:
Andrei Zeliankou
2023-02-21 15:35:38 +00:00
parent 7d7b5a977c
commit 1b7cf1f3d0
3 changed files with 98 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
import sys
def application(environ, start_response):
start_response(
'200',
[
('Content-Length', '0'),
('X-Encoding', sys.getfilesystemencoding()),
],
)
return []

View File

@@ -0,0 +1,8 @@
def application(environ, start_response):
temp_dir = environ.get('HTTP_TEMP_DIR')
with open(temp_dir + '/tempfile', 'w') as f:
f.write('\u26a0\ufe0f')
start_response('200', [('Content-Length', '0')])
return []