Files
notifications-admin/tests/app/main/__init__.py
Rebecca Law 588730d594 109526036: Persist the verify code to the db.
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.
2015-12-10 14:48:01 +00:00

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