Opened 7 years ago

Closed 7 years ago

Last modified 5 years ago

#13108 closed (fixed)

contrib.auth test fails due to duplicate user

Reported by: Ben Owned by: nobody
Component: contrib.auth Version: master
Severity: Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

In django.contrib.auth.tests.auth_backends.py we have (line 153)
self.user2 = User.objects.create_user('test2', 'test2@example.com', 'test')
In django.contrib.auth.tests.forms.py we have (line 224)
>>> user = User.objects.create_user('test2', 'tesT@EXAMple.com', 'test')

These usernames clash and an error is raised. The attached patch simply changes the usernames in forms.py.

Attachments (1)

forms.diff (700 bytes) - added by Ben 7 years ago.

Download all attachments as: .zip

Change History (6)

Changed 7 years ago by Ben

Attachment: forms.diff added

comment:1 Changed 7 years ago by Ben

Component: UncategorizedAuthentication
Has patch: set

comment:2 Changed 7 years ago by Russell Keith-Magee

milestone: 1.2
Triage Stage: UnreviewedReady for checkin

I'm guessing this problem can only be triggered with certain test ordering, because I can't force the error myself. However, it's a trivial fix, so it warrants correction.

comment:3 Changed 7 years ago by Russell Keith-Magee

Resolution: fixed
Status: newclosed

(In [12778]) Fixed #13108 -- Corrected an ambiguity in test data with the potential to cause test failures out of the box. Thanks to benreynwar for the report.

comment:4 Changed 7 years ago by Russell Keith-Magee

(In [12779]) [1.1.X] Fixed #13108 -- Corrected an ambiguity in test data with the potential to cause test failures out of the box. Thanks to benreynwar for the report.

Backport of r12778 from trunk.

comment:5 Changed 5 years ago by Jacob

milestone: 1.2

Milestone 1.2 deleted

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