Opened 10 years ago

Closed 10 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 10 years ago.

Download all attachments as: .zip

Change History (4)

by Diego Guimarães, 10 years ago

Attachment: 23995.diff added

comment:1 by Diego Guimarães, 10 years ago

Cc: diegaogs@… added
Has patch: set

comment:2 by Diego Guimarães, 10 years ago

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

comment:3 by Tim Graham <timograham@…>, 10 years ago

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