Code

Opened 4 years ago

Closed 4 years ago

Last modified 3 years ago

#13108 closed (fixed)

contrib.auth test fails due to duplicate user

Reported by: benreynwar 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 benreynwar 4 years ago.

Download all attachments as: .zip

Change History (6)

Changed 4 years ago by benreynwar

comment:1 Changed 4 years ago by benreynwar

  • Component changed from Uncategorized to Authentication
  • Has patch set
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

comment:2 Changed 4 years ago by russellm

  • milestone set to 1.2
  • Triage Stage changed from Unreviewed to Ready 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 4 years ago by russellm

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

(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 4 years ago by russellm

(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 3 years ago by jacob

  • milestone 1.2 deleted

Milestone 1.2 deleted

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.