Skip to content

admin_user fixtures assume that the user has an email field #439

@orf

Description

@orf

If you have a user model that doesn't have an email field then the admin_user fixture does not work.

In the fixture it blindly passes 'admin@example.com' as the email, but the create_superuser function might not take an email parameter.

E.G:

    def _create_user(self, username, password, **extra_fields):
        pass

    def create_user(self, username, password=None, **extra_fields):
        pass

    def create_superuser(self, username, password, **extra_fields):
        pass

This works for manage.py createsuperuser but not for admin_user

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions