PyDocs

Nav

Internet Protocols and Support

setup_testing_defaults

wsgiref.util

function (source)
  • setup_testing_defaults(environ)
Update 'environ' with trivial defaults for testing purposes

This adds various parameters required for WSGI, including HTTP_HOST,
SERVER_NAME, SERVER_PORT, REQUEST_METHOD, SCRIPT_NAME, PATH_INFO,
and all of the wsgi.* variables.  It only supplies default values,
and does not replace any existing settings for these variables.

This routine is intended to make it easier for unit tests of WSGI
servers and applications to set up dummy environments.  It should *not*
be used by actual WSGI servers or applications, since the data is fake!
0 Examples
No examples for wsgiref.util/setup_testing_defaults.
See Also
No see-alsos for wsgiref.util/setup_testing_defaults
0 Notes
No notes for setup_testing_defaults