Opened 8 years ago

Closed 8 years ago

#23995 closed Cleanup/optimization (fixed)

Remove unnecessary calls to self.client.logout() in tests

Reported by: Tim Graham Owned by: Diego Guimarães
Component: contrib.admin Version: dev
Severity: Normal Keywords:
Cc: diegaogs@… Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

Audit the Django test suite and remove self.client.logout() in tearDown() methods (for example, tests/admin_views/tests.py).

A new test client instance is created for each test; there is no need to logout after every test.

Attachments (1)

23995.diff (15.6 KB) - added by Diego Guimarães 8 years ago.

Download all attachments as: .zip

Change History (4)

Changed 8 years ago by Diego Guimarães

Attachment: 23995.diff added

comment:1 Changed 8 years ago by Diego Guimarães

Cc: diegaogs@… added
Has patch: set

comment:2 Changed 8 years ago by Diego Guimarães

Owner: changed from nobody to Diego Guimarães
Status: newassigned

comment:3 Changed 8 years ago by Tim Graham <timograham@…>

Resolution: fixed
Status: assignedclosed

In ca013e652f912e279c128d4d2631eaa3b02e4db7:

Fixed #23995 -- Removed unnecessary calls to self.client.logout() in tests.

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