mirror of
https://github.com/GSA/notifications-api.git
synced 2026-09-11 10:28:55 -04:00
Bump utils version and improve error message content
This commit is contained in:
@@ -123,7 +123,7 @@ def check_sms_content_char_count(content_count):
|
|||||||
|
|
||||||
def check_notification_content_is_not_empty(template_with_content):
|
def check_notification_content_is_not_empty(template_with_content):
|
||||||
if template_with_content.is_message_empty():
|
if template_with_content.is_message_empty():
|
||||||
message = 'This message is empty.'
|
message = 'Your message is empty.'
|
||||||
raise BadRequestError(message=message)
|
raise BadRequestError(message=message)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
# Putting upgrade on hold due to v1.0.0 using sha512 instead of sha1 by default
|
||||||
itsdangerous==0.24 # pyup: <1.0.0
|
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
|
git+https://github.com/alphagov/boto.git@2.43.0-patch3#egg=boto==2.43.0-patch3
|
||||||
|
|||||||
+3
-3
@@ -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
|
# Putting upgrade on hold due to v1.0.0 using sha512 instead of sha1 by default
|
||||||
itsdangerous==0.24 # pyup: <1.0.0
|
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
|
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
|
amqp==1.4.9
|
||||||
anyjson==0.3.3
|
anyjson==0.3.3
|
||||||
attrs==19.3.0
|
attrs==19.3.0
|
||||||
awscli==1.16.283
|
awscli==1.16.287
|
||||||
bcrypt==3.1.7
|
bcrypt==3.1.7
|
||||||
billiard==3.3.0.23
|
billiard==3.3.0.23
|
||||||
bleach==3.1.0
|
bleach==3.1.0
|
||||||
boto3==1.9.221
|
boto3==1.9.221
|
||||||
botocore==1.13.19
|
botocore==1.13.23
|
||||||
certifi==2019.9.11
|
certifi==2019.9.11
|
||||||
chardet==3.0.4
|
chardet==3.0.4
|
||||||
Click==7.0
|
Click==7.0
|
||||||
|
|||||||
@@ -316,7 +316,7 @@ def test_check_notification_content_is_not_empty_fails(
|
|||||||
with pytest.raises(BadRequestError) as e:
|
with pytest.raises(BadRequestError) as e:
|
||||||
check_notification_content_is_not_empty(template_with_content)
|
check_notification_content_is_not_empty(template_with_content)
|
||||||
assert e.value.status_code == 400
|
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 == []
|
assert e.value.fields == []
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user