From 3c563ddca61d66016471d2dee2561ffbc08ceb24 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Thu, 30 Aug 2018 14:17:32 +0100 Subject: [PATCH] Use commas not tabs to delimit service info MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Zendesk strips out the tabs. Commas are the next best thing because Excel will automatically use them if you select ‘Split text into columns’. --- app/config.py | 1 - app/main/views/service_settings.py | 18 +++++++++--------- tests/app/main/views/test_service_settings.py | 2 +- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/app/config.py b/app/config.py index b7ae9f2ed..e336eddeb 100644 --- a/app/config.py +++ b/app/config.py @@ -85,7 +85,6 @@ class Development(Config): API_HOST_NAME = 'http://localhost:6011' DANGEROUS_SALT = 'dev-notify-salt' SECRET_KEY = 'dev-notify-secret-key' - ZENDESK_API_KEY = "some-key" class Test(Development): diff --git a/app/main/views/service_settings.py b/app/main/views/service_settings.py index 8d4a40cd8..50b935eee 100644 --- a/app/main/views/service_settings.py +++ b/app/main/views/service_settings.py @@ -228,15 +228,15 @@ def submit_request_to_go_live(service_id): '\n' '\n---' '\n' - '{service_id}\t' - '{organisation}\t' - '{service_name}\t' - '{user_name}\t' - '{user_email}\t' - '-\t' - '{date}\t' - '{volume_sms}\t' - '{volume_email}\t' + '{service_id}, ' + '{organisation}, ' + '{service_name}, ' + '{user_name}, ' + '{user_email}, ' + '-, ' + '{date}, ' + '{volume_sms}, ' + '{volume_email}, ' '{volume_letter}' ).format( service_name=current_service.name, diff --git a/tests/app/main/views/test_service_settings.py b/tests/app/main/views/test_service_settings.py index f632e20c7..7a76ee4ea 100644 --- a/tests/app/main/views/test_service_settings.py +++ b/tests/app/main/views/test_service_settings.py @@ -752,7 +752,7 @@ def test_should_redirect_after_request_to_go_live( 'Consent to research: Yes\n' '\n' '---\n' - '{}\tNone\tservice one\tTest User\ttest@user.gov.uk\t-\t21/12/2012\t222\t111\t333' + '{}, None, service one, Test User, test@user.gov.uk, -, 21/12/2012, 222, 111, 333' ).format(SERVICE_ONE_ID, SERVICE_ONE_ID) assert normalize_spaces(page.select_one('.banner-default').text) == (