summaryrefslogtreecommitdiffhomepage
path: root/test/python
diff options
context:
space:
mode:
Diffstat (limited to 'test/python')
-rw-r--r--test/python/user_group/wsgi.py18
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]