Add fields to record a service’s estimated volumes

When a service go live we ask people for their estimated sending
volumes. At the moment we only put this in the ticket, and store it in
a spreadsheet.

This means that a service can
- say they want to go live
- say they are sending 100,000 emails per year
- not have created any email templates
- still see ‘create templates’ as ‘completed’ in the go live checklist

If we store this data against the service we can collect it earlier, and
then use it to determine automatically what kind of templates the user
needs to create before their go live checklist can be considered
complete.
This commit is contained in:
Chris Hill-Scott
2019-02-13 14:00:52 +00:00
parent f8f7d245b3
commit 17e32fa5f6
3 changed files with 59 additions and 0 deletions

View File

@@ -615,6 +615,32 @@ def test_update_service_sets_crown(client, sample_service, org_type, expected):
assert result['data']['crown'] is expected
@pytest.mark.parametrize('field', (
'volume_email',
'volume_sms',
'volume_letter',
))
@pytest.mark.parametrize('value', (
'ABC123',
None,
))
def test_update_service_sets_volumes(
admin_request,
sample_service,
field,
value,
):
admin_request.post(
'service.update_service',
service_id=sample_service.id,
_data={
field: value,
},
_expected_status=200,
)
assert getattr(sample_service, field) == value
@pytest.fixture(scope='function')
def service_with_no_permissions(notify_db, notify_db_session):
return create_service(service_permissions=[])