Bring in utils to bump max fragments to 6 for SMS

This commit is contained in:
David McDonald
2020-04-24 15:43:37 +01:00
parent 6724b2cd74
commit 44155d4e7c
4 changed files with 9 additions and 8 deletions

View File

@@ -26,6 +26,6 @@ notifications-python-client==5.5.1
# PaaS # PaaS
awscli-cwlogs>=1.4,<1.5 awscli-cwlogs>=1.4,<1.5
git+https://github.com/alphagov/notifications-utils.git@37.0.1#egg=notifications-utils==37.0.1 git+https://github.com/alphagov/notifications-utils.git@37.3.0#egg=notifications-utils==37.3.0
gds-metrics==0.2.0 gds-metrics==0.2.0

View File

@@ -28,7 +28,7 @@ notifications-python-client==5.5.1
# PaaS # PaaS
awscli-cwlogs>=1.4,<1.5 awscli-cwlogs>=1.4,<1.5
git+https://github.com/alphagov/notifications-utils.git@37.0.1#egg=notifications-utils==37.0.1 git+https://github.com/alphagov/notifications-utils.git@37.3.0#egg=notifications-utils==37.3.0
gds-metrics==0.2.0 gds-metrics==0.2.0
@@ -37,14 +37,14 @@ alembic==1.4.2
amqp==1.4.9 amqp==1.4.9
anyjson==0.3.3 anyjson==0.3.3
attrs==19.3.0 attrs==19.3.0
awscli==1.18.41 awscli==1.18.45
bcrypt==3.1.7 bcrypt==3.1.7
billiard==3.3.0.23 billiard==3.3.0.23
bleach==3.1.4 bleach==3.1.4
blinker==1.4 blinker==1.4
boto==2.49.0 boto==2.49.0
boto3==1.10.38 boto3==1.10.38
botocore==1.15.41 botocore==1.15.45
certifi==2020.4.5.1 certifi==2020.4.5.1
chardet==3.0.4 chardet==3.0.4
click==7.1.1 click==7.1.1
@@ -53,6 +53,7 @@ dnspython==1.16.0
docutils==0.15.2 docutils==0.15.2
flask-redis==0.4.0 flask-redis==0.4.0
future==0.18.2 future==0.18.2
govuk-bank-holidays==0.6
greenlet==0.4.15 greenlet==0.4.15
idna==2.9 idna==2.9
importlib-metadata==1.6.0 importlib-metadata==1.6.0

View File

@@ -277,7 +277,7 @@ def test_service_can_send_to_recipient_fails_when_mobile_number_is_not_on_team(s
assert e.value.fields == [] 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('show_prefix', [True, False])
@pytest.mark.parametrize('template_type', ['sms', 'email', 'letter']) @pytest.mark.parametrize('template_type', ['sms', 'email', 'letter'])
def test_check_content_char_count_passes(notify_db_session, show_prefix, char_count, template_type): 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 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]) @pytest.mark.parametrize('show_prefix', [True, False])
def test_check_content_char_count_fails(notify_db_session, show_prefix, char_count): def test_check_content_char_count_fails(notify_db_session, show_prefix, char_count):
with pytest.raises(BadRequestError) as e: with pytest.raises(BadRequestError) as e:

View File

@@ -287,7 +287,7 @@ def test_send_one_off_notification_raises_if_message_too_long(persist_mock, noti
post_data = { post_data = {
'template_id': str(template.id), 'template_id': str(template.id),
'to': '07700 900 001', 'to': '07700 900 001',
'personalisation': {'name': '🚫' * 700}, 'personalisation': {'name': '🚫' * 1000},
'created_by': str(service.created_by_id) '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) send_one_off_notification(service.id, post_data)
assert e.value.message == f'Text messages cannot be longer than {SMS_CHAR_COUNT_LIMIT} characters. ' \ 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): def test_send_one_off_notification_fails_if_created_by_other_service(sample_template):