Opened 12 years ago

Closed 12 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)

customuser.diff (1.1 KB ) - added by Ivan Virabyan 12 years ago.
skip tests when custom user is used

Download all attachments as: .zip

Change History (3)

by Ivan Virabyan, 12 years ago

Attachment: customuser.diff added

skip tests when custom user is used

comment:1 by Claude Paroz, 12 years ago

Triage Stage: UnreviewedReady for checkin

comment:2 by Preston Holmes, 12 years ago

Resolution: duplicate
Status: newclosed

While this preceded it, #19057 is a duplicate that has greater discussion on this issue

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