Bump utils version and improve error message content

This commit is contained in:
Pea Tyczynska
2019-11-21 15:48:43 +00:00
parent f4ba82225b
commit c17100af37
4 changed files with 6 additions and 6 deletions

View File

@@ -123,7 +123,7 @@ def check_sms_content_char_count(content_count):
def check_notification_content_is_not_empty(template_with_content):
if template_with_content.is_message_empty():
message = 'This message is empty.'
message = 'Your message is empty.'
raise BadRequestError(message=message)

View File

@@ -29,6 +29,6 @@ awscli-cwlogs>=1.4,<1.5
# Putting upgrade on hold due to v1.0.0 using sha512 instead of sha1 by default
itsdangerous==0.24 # pyup: <1.0.0
git+https://github.com/alphagov/notifications-utils.git@36.1.2#egg=notifications-utils==36.1.2
git+https://github.com/alphagov/notifications-utils.git@36.2.0#egg=notifications-utils==36.2.0
git+https://github.com/alphagov/boto.git@2.43.0-patch3#egg=boto==2.43.0-patch3

View File

@@ -31,7 +31,7 @@ awscli-cwlogs>=1.4,<1.5
# Putting upgrade on hold due to v1.0.0 using sha512 instead of sha1 by default
itsdangerous==0.24 # pyup: <1.0.0
git+https://github.com/alphagov/notifications-utils.git@36.1.2#egg=notifications-utils==36.1.2
git+https://github.com/alphagov/notifications-utils.git@36.2.0#egg=notifications-utils==36.2.0
git+https://github.com/alphagov/boto.git@2.43.0-patch3#egg=boto==2.43.0-patch3
@@ -40,12 +40,12 @@ alembic==1.3.1
amqp==1.4.9
anyjson==0.3.3
attrs==19.3.0
awscli==1.16.283
awscli==1.16.287
bcrypt==3.1.7
billiard==3.3.0.23
bleach==3.1.0
boto3==1.9.221
botocore==1.13.19
botocore==1.13.23
certifi==2019.9.11
chardet==3.0.4
Click==7.0

View File

@@ -316,7 +316,7 @@ def test_check_notification_content_is_not_empty_fails(
with pytest.raises(BadRequestError) as e:
check_notification_content_is_not_empty(template_with_content)
assert e.value.status_code == 400
assert e.value.message == 'This message is empty.'
assert e.value.message == 'Your message is empty.'
assert e.value.fields == []