mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-05 10:53:28 -05:00
The codes are hashed and saved to the db. The code is marked as used once a valid code is submitted. The code is valid for 1 hour. The codes are no longer saved to the session.
17 lines
443 B
Python
17 lines
443 B
Python
from datetime import datetime
|
|
|
|
from app.main.dao import users_dao
|
|
from app.models import User
|
|
|
|
|
|
def create_test_user():
|
|
user = User(name='Test User',
|
|
password='somepassword',
|
|
email_address='test@user.gov.uk',
|
|
mobile_number='+441234123412',
|
|
created_at=datetime.now(),
|
|
role_id=1,
|
|
state='pending')
|
|
users_dao.insert_user(user)
|
|
return user
|