#19495 closed Bug (invalid)

Tests of auth app are breaking if my AUTH_USER_MODEL is 'auth.CustomUser'

Reported by: germanofronza Owned by: nobody
Component: contrib.auth Version: 1.5-beta-1
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


I have an auth app of my own and my custom user model is also called 'auth.CustomUser'. There's a conflict with the fixture 'contrib/auth/fixtures/custom_user.json'.

The test command line is:
$ ./ test auth
Creating test database for alias 'default'...
ERROR: test_confirm_valid_custom_user (django.contrib.auth.tests.views.CustomUserPasswordResetTest)

Traceback (most recent call last):

File "/home/vagrant/venv/local/lib/python2.7/site-packages/django/test/", line 256, in call


File "/home/vagrant/venv/local/lib/python2.7/site-packages/django/test/", line 201, in _pre_setup


File "/home/vagrant/venv/local/lib/python2.7/site-packages/django/test/", line 201, in _pre_setup


File "/home/vagrant/venv/local/lib/python2.7/site-packages/django/test/", line 450, in _pre_setup


File "/home/vagrant/venv/local/lib/python2.7/site-packages/django/test/", line 822, in _fixture_setup

'skip_validation': True,

File "/home/vagrant/venv/local/lib/python2.7/site-packages/django/core/management/", line 161, in call_command

return klass.execute(*args, defaults)

File "/home/vagrant/venv/local/lib/python2.7/site-packages/django/core/management/", line 252, in execute

output = self.handle(*args, options)

File "/home/vagrant/venv/local/lib/python2.7/site-packages/django/core/management/commands/", line 187, in handle

for obj in objects:

File "/home/vagrant/venv/local/lib/python2.7/site-packages/django/core/serializers/", line 75, in Deserializer

raise DeserializationError(e)

DeserializationError: Problem installing fixture '/home/vagrant/venv/local/lib/python2.7/site-packages/django/contrib/auth/fixtures/custom_user.json': CustomUser has no field named u'date_of_birth'

Attachments (0)

Change History (1)

comment:1 Changed 16 months ago by aaugustin

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed

App names (specifically, the last element of the dotted path) must be unique. If you're using 'django.contrib.auth', you can't name your app 'whatever.auth'.

Add Comment

Modify Ticket

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

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

Note: See TracTickets for help on using tickets.