def _create_db_user(): user = User() user.first_name = get_random_string(10) user.last_name = get_random_string(10) user.api_access = True user.is_active = True user.is_super_admin = False user.callback_key = '***' user.password = get_random_string(10) user.email = get_random_string(10) + '@' + get_random_string( 10) + '.com' user.api_key = get_random_string(30) user.username = '******' + get_random_string(10) user.password = get_random_string(10) user.save() return user
def _create_db_user(self): user = User() user.first_name = get_random_string(10) user.last_name = get_random_string(10) user.api_access = True user.is_active = True user.is_staff = False user.password = get_random_string(10) user.email = get_random_string(10) + '@' + get_random_string(10) + '.com' user.username = '******' + get_random_string(10) user.password = get_random_string(10) user.save() user.userprofile.alerting_email = user.email user.userprofile.alerting_phone = get_random_string(10) user.userprofile.alerting_jabber = 'jabber_' + user.email user.userprofile.save() return user