summaryrefslogtreecommitdiffhomepage
path: root/test/python/atexit/wsgi.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/python/atexit/wsgi.py')
-rw-r--r--test/python/atexit/wsgi.py12
1 files changed, 12 insertions, 0 deletions
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 []