Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
wbauth / authentication / tests / fixtures.py
Size: Mime:
import faker, pytest
from slugify import slugify

from django.contrib.auth import get_user_model
from crm.tests.fixtures import random_contact_location

fake = faker.Faker()

@pytest.fixture
def random_superuser():
    contact_location = random_contact_location()
    return get_user_model().objects.create_superuser(
        username = 'some_superuser',
        email = 'some@superuser.com',
        password = '123456abc',
    )

@pytest.fixture
def random_user():
    contact_location = random_contact_location()
    return get_user_model().objects.create_user(
        username = 'some_user',
        email = 'some@user.com',
        password = '123456abc',
    )