MCPcopy
hub / github.com/django/django / _set_login_cookies

Method _set_login_cookies

django/test/client.py:906–917  ·  view source on GitHub ↗
(self, request)

Source from the content-addressed store, hash-verified

904 self._set_login_cookies(request)
905
906 def _set_login_cookies(self, request):
907 # Set the cookie to represent the session.
908 session_cookie = settings.SESSION_COOKIE_NAME
909 self.cookies[session_cookie] = request.session.session_key
910 cookie_data = {
911 "max-age": None,
912 "path": "/",
913 "domain": settings.SESSION_COOKIE_DOMAIN,
914 "secure": settings.SESSION_COOKIE_SECURE or None,
915 "expires": None,
916 }
917 self.cookies[session_cookie].update(cookie_data)
918
919 def logout(self):
920 """Log out the user by removing the cookies and session object."""

Callers 2

_loginMethod · 0.95
_aloginMethod · 0.95

Calls 1

updateMethod · 0.45

Tested by

no test coverage detected