diff --git a/app/main/views/platform_admin.py b/app/main/views/platform_admin.py index 72a9e46cb..47dddc90f 100644 --- a/app/main/views/platform_admin.py +++ b/app/main/views/platform_admin.py @@ -220,6 +220,7 @@ def live_services_csv(): ('sms_totals', 'SMS sent this year'), ('email_totals', 'Emails sent this year'), ('letter_totals', 'Letters sent this year'), + ('free_sms_fragment_limit', 'Free sms allowance'), ]) # initialise with header row diff --git a/tests/app/main/views/test_platform_admin.py b/tests/app/main/views/test_platform_admin.py index 633d882c0..2e0b5a765 100644 --- a/tests/app/main/views/test_platform_admin.py +++ b/tests/app/main/views/test_platform_admin.py @@ -962,12 +962,14 @@ def test_get_live_services_report(client, platform_admin_user, mocker): 'consent_to_research': True, 'contact_name': 'Forest fairy', 'organisation_type': 'Ecosystem', 'contact_email': 'forest.fairy@digital.cabinet-office.gov.uk', 'contact_mobile': '+447700900986', 'live_date': 'Sat, 29 Mar 2014 00:00:00 GMT', 'sms_volume_intent': 100, 'email_volume_intent': 50, - 'letter_volume_intent': 20, 'sms_totals': 300, 'email_totals': 1200, 'letter_totals': 0}, + 'letter_volume_intent': 20, 'sms_totals': 300, 'email_totals': 1200, 'letter_totals': 0, + 'free_sms_fragment_limit': 100}, {'service_id': 2, 'service_name': 'james the pine tree', 'organisation_name': 'Forest', 'consent_to_research': None, 'contact_name': None, 'organisation_type': 'Ecosystem', 'contact_email': None, 'contact_mobile': None, 'live_date': None, 'sms_volume_intent': None, 'email_volume_intent': 60, - 'letter_volume_intent': 0, 'sms_totals': 0, 'email_totals': 0, 'letter_totals': 0}, + 'letter_volume_intent': 0, 'sms_totals': 0, 'email_totals': 0, 'letter_totals': 0, + 'free_sms_fragment_limit': 200}, ]} ) response = client.get(url_for('main.live_services_csv')) @@ -976,12 +978,12 @@ def test_get_live_services_report(client, platform_admin_user, mocker): assert report.strip() == ( 'Service ID,Organisation,Organisation type,Service name,Consent to research,Main contact,Contact email,' + 'Contact mobile,Live date,SMS volume intent,Email volume intent,Letter volume intent,SMS sent this year,' - + 'Emails sent this year,Letters sent this year\r\n' + + 'Emails sent this year,Letters sent this year,Free sms allowance\r\n' + '1,Forest,Ecosystem,jessie the oak tree,True,Forest fairy,forest.fairy@digital.cabinet-office.gov.uk,' - + '+447700900986,29-03-2014,100,50,20,300,1200,0\r\n' + + '+447700900986,29-03-2014,100,50,20,300,1200,0,100\r\n' - + '2,Forest,Ecosystem,james the pine tree,,,,,,,60,0,0,0,0' + + '2,Forest,Ecosystem,james the pine tree,,,,,,,60,0,0,0,0,200' )