Set Notify service user as the creator of Pre-compiled PDF template

This commit is contained in:
Alexey Bezhan
2018-02-23 13:30:35 +00:00
parent 6d1439e39a
commit e659253b01
2 changed files with 10 additions and 2 deletions

View File

@@ -102,6 +102,14 @@ def sample_user(notify_db_session):
return create_user()
@pytest.fixture(scope='function')
def notify_user(notify_db_session):
return create_user(
email="notify-service-user@digital.cabinet-office.gov.uk",
id_=current_app.config['NOTIFY_USER_ID']
)
def create_code(notify_db, notify_db_session, code_type, usr=None, code=None):
if code is None:
code = create_secret_code()

View File

@@ -45,9 +45,9 @@ from app.dao.email_branding_dao import dao_create_email_branding
from app.dao.organisation_dao import dao_create_organisation
def create_user(mobile_number="+447700900986", email="notify@digital.cabinet-office.gov.uk", state='active'):
def create_user(mobile_number="+447700900986", email="notify@digital.cabinet-office.gov.uk", state='active', id_=None):
data = {
'id': uuid.uuid4(),
'id': id_ or uuid.uuid4(),
'name': 'Test User',
'email_address': email,
'password': 'password',