MCPcopy
hub / github.com/pallets/werkzeug / run_wsgi_app

Method run_wsgi_app

src/werkzeug/test.py:980–993  ·  view source on GitHub ↗

Runs the wrapped WSGI app with the given environment. :meta private:

(
        self, environ: WSGIEnvironment, buffered: bool = False
    )

Source from the content-addressed store, hash-verified

978 self._cookies[cookie._storage_key] = cookie
979
980 def run_wsgi_app(
981 self, environ: WSGIEnvironment, buffered: bool = False
982 ) -> tuple[t.Iterable[bytes], str, Headers]:
983 """Runs the wrapped WSGI app with the given environment.
984
985 :meta private:
986 """
987 self._add_cookies_to_wsgi(environ)
988 rv = run_wsgi_app(self.application, environ, buffered=buffered)
989 url = urlsplit(get_current_url(environ))
990 self._update_cookies_from_response(
991 url.hostname or "localhost", url.path, rv[2].getlist("Set-Cookie")
992 )
993 return rv
994
995 def resolve_redirect(
996 self, response: TestResponse, buffered: bool = False

Callers 1

openMethod · 0.95

Calls 5

_add_cookies_to_wsgiMethod · 0.95
run_wsgi_appFunction · 0.85
get_current_urlFunction · 0.70
getlistMethod · 0.45

Tested by

no test coverage detected