Files
deb-python-wsgi-intercept/test/wsgi_app.py
Chris Dent 12d4ef8288 Barebones of initial starting point
None of this works, this just imports the old code, leaving
behind those parts not deemed immediately relevant.
2012-10-02 15:55:06 +01:00

25 lines
507 B
Python

"""
A simple WSGI application for testing.
"""
_app_was_hit = False
def success():
return _app_was_hit
def simple_app(environ, start_response):
"""Simplest possible application object"""
status = '200 OK'
response_headers = [('Content-type','text/plain')]
start_response(status, response_headers)
global _app_was_hit
_app_was_hit = True
return ['WSGI intercept successful!\n']
def create_fn():
global _app_was_hit
_app_was_hit = False
return simple_app