Tests: added tests for setting user and group.
This commit is contained in:
18
test/python/user_group/wsgi.py
Normal file
18
test/python/user_group/wsgi.py
Normal file
@@ -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]
|
||||
Reference in New Issue
Block a user