mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-11 09:27:56 -04:00
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:
@@ -14,6 +14,7 @@ from notifications_utils import SMS_CHAR_COUNT_LIMIT
|
||||
|
||||
|
||||
from app.models import (
|
||||
BROADCAST_TYPE,
|
||||
EMAIL_TYPE,
|
||||
LETTER_TYPE,
|
||||
SMS_TYPE,
|
||||
@@ -31,6 +32,7 @@ from tests.conftest import set_config_values
|
||||
|
||||
|
||||
@pytest.mark.parametrize('template_type, subject', [
|
||||
(BROADCAST_TYPE, None),
|
||||
(SMS_TYPE, None),
|
||||
(EMAIL_TYPE, 'subject'),
|
||||
(LETTER_TYPE, 'subject'),
|
||||
@@ -529,6 +531,7 @@ def test_should_get_return_all_fields_by_default(
|
||||
)
|
||||
assert json_response['data'][0].keys() == {
|
||||
'archived',
|
||||
'broadcast_data',
|
||||
'content',
|
||||
'created_at',
|
||||
'created_by',
|
||||
|
||||
Reference in New Issue
Block a user