Classes | |
| class | ErrorWrapper |
| class | InputWrapper |
| class | IteratorWrapper |
| class | WriteWrapper |
| class | WSGIWarning |
Functions | |
| def | _assert_latin1_py3 |
| def | check_content_type |
| def | check_environ |
| def | check_errors |
| def | check_exc_info |
| def | check_headers |
| def | check_input |
| def | check_iterator |
| def | check_status |
| def | middleware |
| def | to_string |
Variables | |
| list | __all__ = ['middleware'] |
| tuple | bad_header_value_re = re.compile(r'[\000-\037]') |
| tuple | header_re = re.compile(r'^[a-zA-Z][a-zA-Z0-9\-_]*$') |
| tuple | METADATA_TYPE = PY3and(str, binary_type) |
| tuple | SLASH = str('/') |
| tuple | valid_methods |
| def webtest.lint._assert_latin1_py3 | ( | string, | |
| message | |||
| ) | [private] |
| def webtest.lint.check_content_type | ( | status, | |
| headers | |||
| ) |
| def webtest.lint.check_environ | ( | environ | ) |
| def webtest.lint.check_errors | ( | wsgi_errors | ) |
| def webtest.lint.check_exc_info | ( | exc_info | ) |
| def webtest.lint.check_headers | ( | headers | ) |
| def webtest.lint.check_input | ( | wsgi_input | ) |
| def webtest.lint.check_iterator | ( | iterator | ) |
| def webtest.lint.check_status | ( | status | ) |
| def webtest.lint.middleware | ( | application, | |
global_conf = None |
|||
| ) |
When applied between a WSGI server and a WSGI application, this middleware will check for WSGI compliancy on a number of levels. This middleware does not modify the request or response in any way, but will throw an AssertionError if anything seems off (except for a failure to close the application iterator, which will be printed to stderr -- there's no way to throw an exception at that point).
| def webtest.lint.to_string | ( | value | ) |
| list webtest::lint::__all__ = ['middleware'] |
| tuple webtest::lint::bad_header_value_re = re.compile(r'[\000-\037]') |
| tuple webtest::lint::header_re = re.compile(r'^[a-zA-Z][a-zA-Z0-9\-_]*$') |
| tuple webtest::lint::METADATA_TYPE = PY3and(str, binary_type) |
| tuple webtest::lint::SLASH = str('/') |