From c6a11260e8ad5fa64cb025f72aab343aea9f1d63 Mon Sep 17 00:00:00 2001 From: Tiago Natel Date: Mon, 11 Nov 2019 14:36:22 +0000 Subject: Tests: added tests for setting user and group. --- test/python/user_group/wsgi.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 test/python/user_group/wsgi.py (limited to 'test/python/user_group/wsgi.py') 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] -- cgit