#13108 closed (fixed)
contrib.auth test fails due to duplicate user
Reported by: | Ben | Owned by: | nobody |
---|---|---|---|
Component: | contrib.auth | Version: | dev |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Pull Requests: | How to create a pull request | ||
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.
Change History (6)
by , 15 years ago
Attachment: | forms.diff added |
---|
comment:1 by , 15 years ago
Component: | Uncategorized → Authentication |
---|---|
Has patch: | set |
comment:2 by , 15 years ago
milestone: | → 1.2 |
---|---|
Triage Stage: | Unreviewed → Ready for checkin |
comment:3 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:4 by , 15 years ago
Note:
See TracTickets
for help on using tickets.
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.