Tests: added Python tests with encoding.
This commit is contained in:
12
test/python/encoding/wsgi.py
Normal file
12
test/python/encoding/wsgi.py
Normal file
@@ -0,0 +1,12 @@
|
||||
import sys
|
||||
|
||||
|
||||
def application(environ, start_response):
|
||||
start_response(
|
||||
'200',
|
||||
[
|
||||
('Content-Length', '0'),
|
||||
('X-Encoding', sys.getfilesystemencoding()),
|
||||
],
|
||||
)
|
||||
return []
|
||||
8
test/python/unicode/wsgi.py
Normal file
8
test/python/unicode/wsgi.py
Normal 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 []
|
||||
Reference in New Issue
Block a user