Tests: reworked python tests with application.
This commit is contained in:
10
test/python/mirror/wsgi.py
Normal file
10
test/python/mirror/wsgi.py
Normal file
@@ -0,0 +1,10 @@
|
||||
def application(environ, start_response):
|
||||
|
||||
content_length = int(environ.get('CONTENT_LENGTH', 0))
|
||||
body = bytes(environ['wsgi.input'].read(content_length))
|
||||
|
||||
start_response('200', [
|
||||
('Content-Type', environ.get('CONTENT_TYPE')),
|
||||
('Content-Length', str(len(body)))
|
||||
])
|
||||
return [body]
|
||||
Reference in New Issue
Block a user