mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-23 00:41:35 -05:00
notify-233: delete notifications from notifications table after they are successfully sent
This commit is contained in:
@@ -66,11 +66,11 @@ def test_should_retry_and_log_warning_if_SmsClientResponseException_for_deliver_
|
||||
)
|
||||
mocker.patch('app.celery.provider_tasks.deliver_sms.retry')
|
||||
mock_logger_warning = mocker.patch('app.celery.tasks.current_app.logger.warning')
|
||||
assert sample_notification.status == 'created'
|
||||
|
||||
deliver_sms(sample_notification.id)
|
||||
|
||||
assert provider_tasks.deliver_sms.retry.called is True
|
||||
assert sample_notification.status == 'created'
|
||||
assert mock_logger_warning.called
|
||||
|
||||
|
||||
@@ -81,10 +81,10 @@ def test_should_retry_and_log_exception_for_non_SmsClientResponseException_excep
|
||||
mocker.patch('app.celery.provider_tasks.deliver_sms.retry')
|
||||
mock_logger_exception = mocker.patch('app.celery.tasks.current_app.logger.exception')
|
||||
|
||||
assert sample_notification.status == 'created'
|
||||
deliver_sms(sample_notification.id)
|
||||
|
||||
assert provider_tasks.deliver_sms.retry.called is True
|
||||
assert sample_notification.status == 'created'
|
||||
assert mock_logger_exception.called
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user