Update go-live message + tests

This commit is contained in:
Imdad Ahad
2017-02-07 16:14:58 +00:00
parent 7e93058484
commit 24b372de77
3 changed files with 6 additions and 4 deletions
+1 -1
View File
@@ -109,7 +109,7 @@ def service_request_to_go_live(service_id):
'person_name': current_user.name, 'person_name': current_user.name,
'department_id': current_app.config.get('DESKPRO_DEPT_ID'), 'department_id': current_app.config.get('DESKPRO_DEPT_ID'),
'agent_team_id': current_app.config.get('DESKPRO_ASSIGNED_AGENT_TEAM_ID'), 'agent_team_id': current_app.config.get('DESKPRO_ASSIGNED_AGENT_TEAM_ID'),
'subject': 'Request to go live {}'.format(current_service['name']), 'subject': 'Request to go live - {}'.format(current_service['name']),
'message': ( 'message': (
'On behalf of {} ({})\n\nExpected usage\n---' 'On behalf of {} ({})\n\nExpected usage\n---'
'\nMOU in place: {}' '\nMOU in place: {}'
+4 -2
View File
@@ -76,9 +76,11 @@ def test_passed_non_logged_in_user_details_through_flow(client, mocker, ticket_t
return_value=Mock(status_code=201) return_value=Mock(status_code=201)
) )
data = {'feedback': 'blah', 'name': 'Steve Irwin', 'email_address': 'rip@gmail.com'}
resp = client.post( resp = client.post(
url_for('main.feedback', ticket_type=ticket_type), url_for('main.feedback', ticket_type=ticket_type),
data={'feedback': 'blah', 'name': 'Steve Irwin', 'email_address': 'rip@gmail.com'}, data=data
) )
assert resp.status_code == 302 assert resp.status_code == 302
@@ -128,7 +130,7 @@ def test_passes_user_details_through_flow(
data={ data={
'department_id': ANY, 'department_id': ANY,
'agent_team_id': ANY, 'agent_team_id': ANY,
'subject': 'Notify feedback', 'subject': 'Notify feedback Test User',
'message': ANY, 'message': ANY,
'person_email': 'test@user.gov.uk', 'person_email': 'test@user.gov.uk',
'person_name': 'Test User', 'person_name': 'Test User',
@@ -303,7 +303,7 @@ def test_should_redirect_after_request_to_go_live(
mock_post.assert_called_with( mock_post.assert_called_with(
ANY, ANY,
data={ data={
'subject': 'Request to go live', 'subject': 'Request to go live - Test Service',
'department_id': ANY, 'department_id': ANY,
'agent_team_id': ANY, 'agent_team_id': ANY,
'message': ANY, 'message': ANY,