code review feedback

This commit is contained in:
Kenneth Kehl
2023-08-15 14:50:41 -07:00
parent c5008da8df
commit f2f0e5a0f1
10 changed files with 2 additions and 165 deletions

View File

@@ -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')

View File

@@ -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',