<filename>fpiweb/tests/utility.py


from django.contrib.auth.models import User


default_password = '<PASSWORD>'


def create_user(first_name, last_name):
    first_name = first_name.lower()
    last_name = last_name.lower()

    return User.objects.create_user(
        first_name[0] + last_name,
        f"{first_name}.{last_name}",
        default_password,
    )

<filename>fpiweb/tests/utility.py


from django.contrib.auth.models import User


default_password = '<PASSWORD>'


def create_user(first_name, last_name):
    first_name = first_name.lower()
    last_name = last_name.lower()

    return User.objects.create_user(
        first_name[0] + last_name,
        f"{first_name}.{last_name}",
        default_password,
    )
