From 24b372de77bca4ebae793fa9cd0bc88e8863d6b8 Mon Sep 17 00:00:00 2001 From: Imdad Ahad Date: Tue, 7 Feb 2017 16:14:58 +0000 Subject: [PATCH] Update go-live message + tests --- app/main/views/service_settings.py | 2 +- tests/app/main/views/test_feedback.py | 6 ++++-- tests/app/main/views/test_service_settings.py | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/main/views/service_settings.py b/app/main/views/service_settings.py index 0f375d283..098bef06d 100644 --- a/app/main/views/service_settings.py +++ b/app/main/views/service_settings.py @@ -109,7 +109,7 @@ def service_request_to_go_live(service_id): 'person_name': current_user.name, 'department_id': current_app.config.get('DESKPRO_DEPT_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': ( 'On behalf of {} ({})\n\nExpected usage\n---' '\nMOU in place: {}' diff --git a/tests/app/main/views/test_feedback.py b/tests/app/main/views/test_feedback.py index ed7b55953..d5ba67544 100644 --- a/tests/app/main/views/test_feedback.py +++ b/tests/app/main/views/test_feedback.py @@ -76,9 +76,11 @@ def test_passed_non_logged_in_user_details_through_flow(client, mocker, ticket_t return_value=Mock(status_code=201) ) + data = {'feedback': 'blah', 'name': 'Steve Irwin', 'email_address': 'rip@gmail.com'} + resp = client.post( 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 @@ -128,7 +130,7 @@ def test_passes_user_details_through_flow( data={ 'department_id': ANY, 'agent_team_id': ANY, - 'subject': 'Notify feedback', + 'subject': 'Notify feedback Test User', 'message': ANY, 'person_email': 'test@user.gov.uk', 'person_name': 'Test User', diff --git a/tests/app/main/views/test_service_settings.py b/tests/app/main/views/test_service_settings.py index a87c7e245..46dacf863 100644 --- a/tests/app/main/views/test_service_settings.py +++ b/tests/app/main/views/test_service_settings.py @@ -303,7 +303,7 @@ def test_should_redirect_after_request_to_go_live( mock_post.assert_called_with( ANY, data={ - 'subject': 'Request to go live', + 'subject': 'Request to go live - Test Service', 'department_id': ANY, 'agent_team_id': ANY, 'message': ANY,