mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-31 23:26:23 -05:00
add new notification status 'sent'
for international text messages, when we may not ever receive callback info, so we need a separate status that doesn't get timed out etc
This commit is contained in:
@@ -26,8 +26,8 @@ def test_get_fragment_count_separates_sms_and_email(notify_db, sample_template,
|
||||
def test_get_fragment_count_filters_on_status(notify_db, sample_template):
|
||||
for status in NOTIFICATION_STATUS_TYPES:
|
||||
noti_hist(notify_db, sample_template, status=status)
|
||||
# sending, delivered, failed, technical-failure, temporary-failure, permanent-failure
|
||||
assert get_fragment_count(sample_template.service_id)['sms_count'] == 6
|
||||
# sending, sent, delivered, failed, technical-failure, temporary-failure, permanent-failure
|
||||
assert get_fragment_count(sample_template.service_id)['sms_count'] == 7
|
||||
|
||||
|
||||
def test_get_fragment_count_filters_on_service_id(notify_db, sample_template, service_factory):
|
||||
|
||||
@@ -307,8 +307,8 @@ def test_get_all_notifications_filter_by_status_invalid_status(client, sample_no
|
||||
|
||||
assert json_response['status_code'] == 400
|
||||
assert len(json_response['errors']) == 1
|
||||
assert json_response['errors'][0]['message'] == "status elephant is not one of [created, sending, delivered, " \
|
||||
"pending, failed, technical-failure, temporary-failure, permanent-failure]"
|
||||
assert json_response['errors'][0]['message'] == "status elephant is not one of [created, sending, sent, " \
|
||||
"delivered, pending, failed, technical-failure, temporary-failure, permanent-failure]"
|
||||
|
||||
|
||||
def test_get_all_notifications_filter_by_multiple_statuses(client, notify_db, notify_db_session):
|
||||
|
||||
@@ -27,7 +27,7 @@ def test_get_notifications_request_invalid_statuses(
|
||||
invalid_statuses, valid_statuses
|
||||
):
|
||||
partial_error_status = "is not one of " \
|
||||
"[created, sending, delivered, pending, failed, " \
|
||||
"[created, sending, sent, delivered, pending, failed, " \
|
||||
"technical-failure, temporary-failure, permanent-failure]"
|
||||
|
||||
with pytest.raises(ValidationError) as e:
|
||||
@@ -74,7 +74,7 @@ def test_get_notifications_request_invalid_statuses_and_template_types():
|
||||
|
||||
error_messages = [error['message'] for error in errors]
|
||||
for invalid_status in ["elephant", "giraffe"]:
|
||||
assert "status {} is not one of [created, sending, delivered, " \
|
||||
assert "status {} is not one of [created, sending, sent, delivered, " \
|
||||
"pending, failed, technical-failure, temporary-failure, permanent-failure]".format(
|
||||
invalid_status
|
||||
) in error_messages
|
||||
|
||||
Reference in New Issue
Block a user