add broadcast to template_types and add broadcast_data

had to go through the code and change a few places where we filter on
template types. i specifically didn't worry about jobs or notifications.

Also, add braodcast_data - a json column that might contain arbitrary
broadcast data that we'll figure out as we go. We don't know what it'll
look like, but it should be returned by the API
This commit is contained in:
Leo Hemsted
2020-07-02 12:12:34 +01:00
parent 3954cd0e4a
commit 7ecd7341b0
12 changed files with 45 additions and 22 deletions

View File

@@ -112,7 +112,7 @@ def test_get_all_templates_for_invalid_type_returns_400(client, sample_service):
'status_code': 400,
'errors': [
{
'message': 'type coconut is not one of [sms, email, letter]',
'message': 'type coconut is not one of [sms, email, letter, broadcast]',
'error': 'ValidationError'
}
]

View File

@@ -242,7 +242,7 @@ def test_get_all_template_request_schema_against_invalid_args_is_invalid(templat
assert errors['status_code'] == 400
assert len(errors['errors']) == 1
assert errors['errors'][0]['message'] == 'type unknown is not one of [sms, email, letter]'
assert errors['errors'][0]['message'] == 'type unknown is not one of [sms, email, letter, broadcast]'
@pytest.mark.parametrize("response", valid_json_get_all_response)