Include organisation type in request to go live

This is so we can catch organisations that are going live with the wrong
free text message allowance.
This commit is contained in:
Chris Hill-Scott
2018-01-11 18:10:22 +00:00
parent 4e99c2fb8b
commit 48106f22a3
2 changed files with 7 additions and 2 deletions

View File

@@ -153,7 +153,6 @@ def service_request_to_go_live(service_id):
form = RequestToGoLiveForm()
if form.validate_on_submit():
data = {
'person_email': current_user.email_address,
'person_name': current_user.name,
@@ -161,13 +160,17 @@ def service_request_to_go_live(service_id):
'agent_team_id': current_app.config.get('DESKPRO_ASSIGNED_AGENT_TEAM_ID'),
'subject': 'Request to go live - {}'.format(current_service['name']),
'message': (
'On behalf of {} ({})\n\nExpected usage\n---'
'On behalf of {} ({})\n'
'\n---'
'\nOrganisation type: {} ({:,} free text messages)'
'\nMOU in place: {}'
'\nChannel: {}\nStart date: {}\nStart volume: {}'
'\nPeak volume: {}\nUpload or API: {}'
).format(
current_service['name'],
url_for('main.service_dashboard', service_id=current_service['id'], _external=True),
current_service['organisation_type'],
current_service['free_sms_fragment_limit'],
form.mou.data,
formatted_list(filter(None, (
'email' if form.channel_email.data else None,

View File

@@ -477,6 +477,8 @@ def test_should_redirect_after_request_to_go_live(
)
returned_message = mock_post.call_args[1]['data']['message']
assert 'On behalf of service one' in returned_message
assert 'Organisation type: central (250,000 free text messages)' in returned_message
assert 'Channel: email and text messages' in returned_message
assert 'Start date: 01/01/2017' in returned_message
assert 'Start volume: 100,000' in returned_message