From 76da1ab28ded9cb77b8f1fce0d716a1c03961a0b Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Wed, 28 Feb 2018 16:50:20 +0000 Subject: [PATCH] Stop creating tour text messages as priority MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since we send all one off messages as priority now[1], we don’t need to explicitly mark this template as being priority. This stops the (potential) problem of people skipping the tour, still having this template and then modifying it to send other messages, potentially in high volumes from CSV files or the API. I don’t think this is a real problem now, but worth cleaning this up. Currently: - 827 priority templates in the database - 195 of which are not deleted - 18 of which are not called ‘Example text message template’ - 3 of which look like genuine use cases, not from services that we run [1]: https://github.com/alphagov/notifications-api/pull/1722 --- app/main/views/add_service.py | 1 - tests/app/main/views/test_add_service.py | 1 - 2 files changed, 2 deletions(-) diff --git a/app/main/views/add_service.py b/app/main/views/add_service.py index 19b79178e..45314ad20 100644 --- a/app/main/views/add_service.py +++ b/app/main/views/add_service.py @@ -55,7 +55,6 @@ def _create_example_template(service_id): 'sms', 'Hey ((name)), I’m trying out Notify. Today is ((day of week)) and my favourite colour is ((colour)).', service_id, - process_type='priority', ) return example_sms_template diff --git a/tests/app/main/views/test_add_service.py b/tests/app/main/views/test_add_service.py index 823490ab8..3ed7ac7ff 100644 --- a/tests/app/main/views/test_add_service.py +++ b/tests/app/main/views/test_add_service.py @@ -57,7 +57,6 @@ def test_should_add_service_and_redirect_to_tour_when_no_services( '((day of week)) and my favourite colour is ((colour)).' ), 101, - process_type='priority', ) assert session['service_id'] == 101 assert response.status_code == 302