MCPcopy
hub / github.com/django/django / alogout

Method alogout

django/test/client.py:933–946  ·  view source on GitHub ↗

See logout().

(self)

Source from the content-addressed store, hash-verified

931 self.cookies = SimpleCookie()
932
933 async def alogout(self):
934 """See logout()."""
935 from django.contrib.auth import aget_user, alogout
936
937 request = HttpRequest()
938 session = await self.asession()
939 if session:
940 request.session = session
941 request.user = await aget_user(request)
942 else:
943 engine = import_module(settings.SESSION_ENGINE)
944 request.session = engine.SessionStore()
945 await alogout(request)
946 self.cookies = SimpleCookie()
947
948 def _parse_json(self, response, **extra):
949 if not hasattr(response, "_json"):

Callers 2

_aremove_invalid_userMethod · 0.80
test_client_alogoutMethod · 0.80

Calls 4

asessionMethod · 0.95
HttpRequestClass · 0.90
aget_userFunction · 0.90
alogoutFunction · 0.90

Tested by 1

test_client_alogoutMethod · 0.64