mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-01 15:46:07 -05:00
code review feedback
This commit is contained in:
@@ -325,10 +325,6 @@ def test_delete_notifications_task_calls_task_for_services_that_have_sent_notifi
|
||||
])
|
||||
|
||||
|
||||
def delete_notifications_by_service_and_type(id, param, param1):
|
||||
pass
|
||||
|
||||
|
||||
def test_cleanup_unfinished_jobs(mocker):
|
||||
mock_s3 = mocker.patch('app.celery.nightly_tasks.remove_csv_object')
|
||||
mock_dao_archive = mocker.patch('app.celery.nightly_tasks.dao_archive_job')
|
||||
|
||||
@@ -42,24 +42,6 @@ def test_should_add_to_retry_queue_if_notification_not_found_in_deliver_sms_task
|
||||
app.celery.provider_tasks.deliver_sms.retry.assert_called_with(queue="retry-tasks", countdown=0)
|
||||
|
||||
|
||||
def test_send_sms_should_not_switch_providers_on_non_provider_failure(
|
||||
sample_notification,
|
||||
mocker
|
||||
):
|
||||
mocker.patch(
|
||||
'app.delivery.send_to_providers.send_sms_to_provider',
|
||||
side_effect=Exception("Non Provider Exception")
|
||||
)
|
||||
mock_dao_reduce_sms_provider_priority = mocker.patch(
|
||||
'app.delivery.send_to_providers.dao_reduce_sms_provider_priority'
|
||||
)
|
||||
mocker.patch('app.celery.provider_tasks.deliver_sms.retry')
|
||||
|
||||
deliver_sms(sample_notification.id)
|
||||
|
||||
assert mock_dao_reduce_sms_provider_priority.called is False
|
||||
|
||||
|
||||
def test_should_retry_and_log_warning_if_SmsClientResponseException_for_deliver_sms_task(sample_notification, mocker):
|
||||
mocker.patch(
|
||||
'app.delivery.send_to_providers.send_sms_to_provider',
|
||||
|
||||
Reference in New Issue
Block a user