<filename>authors/apps/authentication/tests/utils.py
""" utils provide data and methods used for testing. """
from django.contrib.auth import get_user_model

TEST_USER = {
    "user": {
        "email": "<EMAIL>",
        "password": "<PASSWORD>",
        "username": "testuser"
    }
}

def create_user(username="testuser", email="<EMAIL>", password="password"):
    """ create_user() creates and returns a user. """
    user = get_user_model().objects.create_user(username, email, password=password)
    user.save()
    return user 
    