class documentation

class _TestCookieJar(CookieJar): (source)

View In Hierarchy

A cookielib.CookieJar modified to inject and read cookie headers from and to wsgi environments, and wsgi application responses.

Method extract_wsgi Extract the server's set-cookie headers as cookies into the cookie jar.
Method inject_wsgi Inject the cookies as client headers into the server's wsgi environment.
def extract_wsgi(self, environ: WSGIEnvironment, headers: t.Union[Headers, t.List[t.Tuple[str, str]]]): (source)

Extract the server's set-cookie headers as cookies into the cookie jar.

def inject_wsgi(self, environ: WSGIEnvironment): (source)

Inject the cookies as client headers into the server's wsgi environment.