diff options
author | Tiago Natel <t.nateldemoura@f5.com> | 2019-11-11 14:36:22 +0000 |
---|---|---|
committer | Tiago Natel <t.nateldemoura@f5.com> | 2019-11-11 14:36:22 +0000 |
commit | c6a11260e8ad5fa64cb025f72aab343aea9f1d63 (patch) | |
tree | 822d7cd3ed1eac6b9337256197cde76fa6ce28ff /test/python | |
parent | abbad122bb48cb1d8b650158a3e6180dbe5ee9e5 (diff) | |
download | unit-c6a11260e8ad5fa64cb025f72aab343aea9f1d63.tar.gz unit-c6a11260e8ad5fa64cb025f72aab343aea9f1d63.tar.bz2 |
Tests: added tests for setting user and group.
Diffstat (limited to 'test/python')
-rw-r--r-- | test/python/user_group/wsgi.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/python/user_group/wsgi.py b/test/python/user_group/wsgi.py new file mode 100644 index 00000000..f5deb87d --- /dev/null +++ b/test/python/user_group/wsgi.py @@ -0,0 +1,18 @@ +import json +import os + +def application(environ, start_response): + uid = os.geteuid() + gid = os.getegid() + + out = json.dumps({ + 'UID': uid, + 'GID': gid, + }).encode('utf-8') + + start_response('200 OK', [ + ('Content-Length', str(len(out))), + ('Content-Type', 'application/json') + ]) + + return [out] |