mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-01 15:46:07 -05:00
Rename check_character_count method to check_is_message_to_long.
Add different error message for email and text if content is too long. Use utils version with is_message_too_long method implemented for email templates.
This commit is contained in:
@@ -317,8 +317,9 @@ def test_send_one_off_notification_raises_if_message_too_long(persist_mock, noti
|
||||
with pytest.raises(BadRequestError) as e:
|
||||
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 {1029} characters'
|
||||
assert e.value.message == f'Your message is too long. ' \
|
||||
f'Text messages cannot be longer than {SMS_CHAR_COUNT_LIMIT} characters. ' \
|
||||
f'Your message is {1029} characters long.'
|
||||
|
||||
|
||||
def test_send_one_off_notification_fails_if_created_by_other_service(sample_template):
|
||||
|
||||
Reference in New Issue
Block a user