Opened 3 years ago

Closed 2 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: master
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


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.


Change History (7)

comment:1 Changed 3 years ago by awsum

  • Has patch set
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

comment:2 Changed 3 years ago by mjtamlyn

  • Cc marc.tamlyn@… added
  • Needs documentation set
  • Triage Stage changed from Unreviewed to Accepted

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 Changed 3 years ago by mjtamlyn

  • Triage Stage changed from Accepted to Ready for checkin

Subject to release notes, this is now RFC.

comment:4 Changed 3 years ago by anonymous

Can we have this anytime soon?

comment:5 Changed 3 years ago by mjtamlyn

  • Patch needs improvement set
  • Triage Stage changed from Ready for checkin to Accepted

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

comment:6 Changed 3 years ago by fhahn

  • Cc flo@… added
  • Owner changed from nobody to fhahn
  • Patch needs improvement unset
  • Status changed from new to assigned

I've updated the patch (after contacting the creator of the patch) and created a new pull request:

comment:7 Changed 2 years ago by Tim Graham <timograham@…>

  • Resolution set to fixed
  • Status changed from assigned to closed

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