Tests: configuration of environment variables.

This commit is contained in:
Andrey Zelenkov
2018-05-29 15:29:01 +03:00
parent d7e6e2bd8c
commit 569a907dbb
2 changed files with 141 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
import os
def application(env, start_response):
body = ''
vars = env.get('HTTP_X_VARIABLES').split(',')
for var in vars:
if var in os.environ:
body += str(os.environ[var]) + ','
body = body.encode()
start_response('200', [('Content-Length', str(len(body)))])
return body