From f27953af6103db390aa3eee012a254f130fdf5f4 Mon Sep 17 00:00:00 2001 From: Max Romanov Date: Thu, 5 Nov 2020 00:05:02 +0300 Subject: Tests: added Python threading tests. --- test/python/threads/wsgi.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 test/python/threads/wsgi.py (limited to 'test/python/threads/wsgi.py') diff --git a/test/python/threads/wsgi.py b/test/python/threads/wsgi.py new file mode 100644 index 00000000..1cc8ffe2 --- /dev/null +++ b/test/python/threads/wsgi.py @@ -0,0 +1,15 @@ +import time +import threading + +def application(environ, start_response): + delay = float(environ.get('HTTP_X_DELAY', 0)) + + time.sleep(delay) + + start_response('200', [ + ('Content-Length', '0'), + ('Wsgi-Multithread', str(environ['wsgi.multithread'])), + ('X-Thread', str(threading.currentThread().ident)) + ]) + + return [] -- cgit