""" 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