mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-31 15:15:38 -05:00
Bring in utils to bump max fragments to 6 for SMS
This commit is contained in:
@@ -277,7 +277,7 @@ def test_service_can_send_to_recipient_fails_when_mobile_number_is_not_on_team(s
|
||||
assert e.value.fields == []
|
||||
|
||||
|
||||
@pytest.mark.parametrize('char_count', [612, 0, 494, 200])
|
||||
@pytest.mark.parametrize('char_count', [612, 0, 494, 200, 918])
|
||||
@pytest.mark.parametrize('show_prefix', [True, False])
|
||||
@pytest.mark.parametrize('template_type', ['sms', 'email', 'letter'])
|
||||
def test_check_content_char_count_passes(notify_db_session, show_prefix, char_count, template_type):
|
||||
@@ -288,7 +288,7 @@ def test_check_content_char_count_passes(notify_db_session, show_prefix, char_co
|
||||
assert check_content_char_count(template_with_content) is None
|
||||
|
||||
|
||||
@pytest.mark.parametrize('char_count', [613, 700, 6000])
|
||||
@pytest.mark.parametrize('char_count', [919, 6000])
|
||||
@pytest.mark.parametrize('show_prefix', [True, False])
|
||||
def test_check_content_char_count_fails(notify_db_session, show_prefix, char_count):
|
||||
with pytest.raises(BadRequestError) as e:
|
||||
|
||||
@@ -287,7 +287,7 @@ def test_send_one_off_notification_raises_if_message_too_long(persist_mock, noti
|
||||
post_data = {
|
||||
'template_id': str(template.id),
|
||||
'to': '07700 900 001',
|
||||
'personalisation': {'name': '🚫' * 700},
|
||||
'personalisation': {'name': '🚫' * 1000},
|
||||
'created_by': str(service.created_by_id)
|
||||
}
|
||||
|
||||
@@ -295,7 +295,7 @@ def test_send_one_off_notification_raises_if_message_too_long(persist_mock, noti
|
||||
send_one_off_notification(service.id, post_data)
|
||||
|
||||
assert e.value.message == f'Text messages cannot be longer than {SMS_CHAR_COUNT_LIMIT} characters. ' \
|
||||
f'Your message is {729} characters'
|
||||
f'Your message is {1029} characters'
|
||||
|
||||
|
||||
def test_send_one_off_notification_fails_if_created_by_other_service(sample_template):
|
||||
|
||||
Reference in New Issue
Block a user