From 09f2009df564ab2063ee4713ba24247039945146 Mon Sep 17 00:00:00 2001 From: Andrey Zelenkov Date: Tue, 20 Feb 2018 20:34:41 +0300 Subject: Tests: reworked python tests with application. --- test/python/atexit/wsgi.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 test/python/atexit/wsgi.py (limited to 'test/python/atexit') diff --git a/test/python/atexit/wsgi.py b/test/python/atexit/wsgi.py new file mode 100644 index 00000000..9ad300b9 --- /dev/null +++ b/test/python/atexit/wsgi.py @@ -0,0 +1,12 @@ +import atexit + +def application(environ, start_response): + test_dir = environ.get('HTTP_TEST_DIR') + + def create_file(): + open(test_dir + '/atexit', 'w') + + atexit.register(create_file) + + start_response('200', [('Content-Length', '0')]) + return [] -- cgit