handle if user doesn't provide name/email

also clean up usage of DESKPRO_PERSON_EMAIL and put it in the conf rather than env
This commit is contained in:
Leo Hemsted
2016-08-04 18:01:08 +01:00
parent ff46aaa6cc
commit d5238bce5b
8 changed files with 35 additions and 37 deletions

View File

@@ -241,10 +241,9 @@ def test_should_redirect_after_request_to_go_live(
'subject': 'Request to go live',
'department_id': ANY,
'agent_team_id': ANY,
'message': 'From Test User <test@user.gov.uk> on behalf of Test Service (http://localhost/services/6ce466d0-fd6a-11e5-82f5-e0accb9d11a6/dashboard)\n\nUsage estimate\n---\n\nOne million messages', # noqa
# noqa
# noqa
'person_email': ANY
'message': 'On behalf of Test Service (http://localhost/services/6ce466d0-fd6a-11e5-82f5-e0accb9d11a6/dashboard)\n\nUsage estimate\n---\n\nOne million messages', # noqa
'person_name': api_user_active.name,
'person_email': api_user_active.email_address
},
headers=ANY
)