diff --git a/app/models.py b/app/models.py index f5bf62087..61f8b79c9 100644 --- a/app/models.py +++ b/app/models.py @@ -1034,6 +1034,7 @@ class VerifyCode(db.Model): return check_hash(cde, self._code) +NOTIFICATION_CANCELLED = 'cancelled' NOTIFICATION_CREATED = 'created' NOTIFICATION_SENDING = 'sending' NOTIFICATION_SENT = 'sent' @@ -1077,6 +1078,7 @@ NOTIFICATION_STATUS_TYPES_BILLABLE = [ ] NOTIFICATION_STATUS_TYPES = [ + NOTIFICATION_CANCELLED, NOTIFICATION_CREATED, NOTIFICATION_SENDING, NOTIFICATION_SENT, diff --git a/tests/app/v2/notifications/test_notification_schemas.py b/tests/app/v2/notifications/test_notification_schemas.py index 55b21cd83..db0b72490 100644 --- a/tests/app/v2/notifications/test_notification_schemas.py +++ b/tests/app/v2/notifications/test_notification_schemas.py @@ -42,7 +42,7 @@ def test_get_notifications_request_invalid_statuses( invalid_statuses, valid_statuses ): partial_error_status = "is not one of " \ - "[created, sending, sent, delivered, pending, failed, " \ + "[cancelled, created, sending, sent, delivered, pending, failed, " \ "technical-failure, temporary-failure, permanent-failure, pending-virus-check, " \ "virus-scan-failed, accepted, received]" @@ -90,7 +90,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, sent, delivered, " \ + assert "status {} is not one of [cancelled, created, sending, sent, delivered, " \ "pending, failed, technical-failure, temporary-failure, permanent-failure, " \ "pending-virus-check, virus-scan-failed, accepted, received]".format( invalid_status