Opened 12 years ago

Closed 12 years ago

#18924 closed Bug (fixed)

test.Client.logout doesn't send user_logged_out signal

Reported by: awsum Owned by: fhahn
Component: Testing framework Version: dev
Severity: Normal Keywords:
Cc: marc.tamlyn@…, flo@… Triage Stage: Accepted
Has patch: yes Needs documentation: yes
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

As docs say user_logged_out signal should be send wherever logout method called. Instead of reusing contrib.auth.logout Client doing session clean up by it's own and doesn't send user_logged_out signal.

Fix: https://github.com/django/django/pull/322

Change History (7)

comment:1 by awsum, 12 years ago

Has patch: set

comment:2 by Marc Tamlyn, 12 years ago

Cc: marc.tamlyn@… added
Needs documentation: set
Triage Stage: UnreviewedAccepted

There's one unused import in the current patch which I've highlighted on github.

This should be mentioned in release notes as someone may have signals which now get fired by their tests and are unexpected. There's probably no need to mention it in the normal docs though.

comment:3 by Marc Tamlyn, 12 years ago

Triage Stage: AcceptedReady for checkin

Subject to release notes, this is now RFC.

comment:4 by anonymous, 12 years ago

Can we have this anytime soon?

comment:5 by Marc Tamlyn, 12 years ago

Patch needs improvement: set
Triage Stage: Ready for checkinAccepted

Patch has now gone stale - it will need updating for custom user models.

comment:6 by fhahn, 12 years ago

Cc: flo@… added
Owner: changed from nobody to fhahn
Patch needs improvement: unset
Status: newassigned

I've updated the patch (after contacting the creator of the patch) and created a new pull request: https://github.com/django/django/pull/731

comment:7 by Tim Graham <timograham@…>, 12 years ago

Resolution: fixed
Status: assignedclosed

In a35ed202419a054a9125ee6205a1a7b4eb3cb46d:

Fixed #18924 -- Made test.Client.logout send user_logged_out signal.

Thanks awsum for the suggestion and Pavel Ponomarev and
Florian Hahn for the patch.

Note: See TracTickets for help on using tickets.
Back to Top