Opened 13 years ago
Closed 13 years ago
#19050 closed Bug (duplicate)
auth.ModWsgiHandlerTestCase fails when User model is swapped
| Reported by: | Ivan Virabyan | Owned by: | nobody |
|---|---|---|---|
| Component: | contrib.auth | Version: | dev |
| Severity: | Normal | 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 |
Description
Assuming AUTH_USER_MODEL is set, running this test fails:
$python manage.py test auth.ModWsgiHandlerTestCase.test_check_password
ERROR: test_check_password (django.contrib.auth.tests.handlers.ModWsgiHandlerTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/ivan/Projects/django/django/contrib/auth/tests/handlers.py", line 14, in setUp
user1 = User.objects.create_user('test', 'test@example.com', 'test')
AttributeError: type object 'User' has no attribute 'objects'
Attachments (1)
Change History (3)
by , 13 years ago
| Attachment: | customuser.diff added |
|---|
comment:1 by , 13 years ago
| Triage Stage: | Unreviewed → Ready for checkin |
|---|
comment:2 by , 13 years ago
| Resolution: | → duplicate |
|---|---|
| Status: | new → closed |
While this preceded it, #19057 is a duplicate that has greater discussion on this issue
Note:
See TracTickets
for help on using tickets.
skip tests when custom user is used