You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
jumpserver/apps/users/tests/base.py

24 lines
404 B

# ~*~ coding: utf-8 ~*~
from random import choice
import forgery_py
from users.models import User, UserGroup, init_all_models
def gen_username():
return forgery_py.internet.user_name(True)
def gen_email():
return forgery_py.internet.email_address()
def gen_name():
return forgery_py.name.full_name()
def get_role():
role = choice(dict(User.ROLE_CHOICES).keys())
return role