Exemplo n.º 1
0
def _create_profile_user(first_name: str, last_name: str, email: str,
                         salutation: str, job_title: str) -> User:
    """"""
    user = User()
    user.first_name = first_name
    user.last_name = last_name
    user.email = email
    profile = UserProfile()
    profile.salutation = salutation
    profile.job_title = job_title
    profile.user = user
    user.save()
    profile.save()
    return user
Exemplo n.º 2
0
def _create_user(first_name: str, last_name: str, email: str) -> User:
    """Abstracting this allows us to test more scenarios than just passing the
    fixture around.

    Args:
        first_name (str): The user's first name
        last_name (str): The user's last name

    Returns:
        SectionPage: User
    """
    user = User()
    user.first_name = first_name
    user.last_name = last_name
    user.email = email
    user.save()
    return user