Merge branch 'main' of https://github.com/GSA/notifications-api into notify-233b

This commit is contained in:
Kenneth Kehl
2023-05-26 13:13:13 -07:00
80 changed files with 1658 additions and 883 deletions

View File

@@ -23,6 +23,7 @@ def test_should_call_send_sms_to_provider_from_deliver_sms_task(
sample_notification,
mocker):
mocker.patch('app.delivery.send_to_providers.send_sms_to_provider')
mocker.patch('app.celery.provider_tasks.check_sms_delivery_receipt')
deliver_sms(sample_notification.id)
app.delivery.send_to_providers.send_sms_to_provider.assert_called_with(sample_notification)
@@ -88,7 +89,6 @@ def test_should_retry_and_log_exception_for_non_SmsClientResponseException_excep
assert mock_logger_exception.called
@pytest.mark.skip(reason="Needs updating for TTS: Failing for unknown reason")
def test_should_go_into_technical_error_if_exceeds_retries_on_deliver_sms_task(sample_notification, mocker):
mocker.patch('app.delivery.send_to_providers.send_sms_to_provider', side_effect=Exception("EXPECTED"))
mocker.patch('app.celery.provider_tasks.deliver_sms.retry', side_effect=MaxRetriesExceededError())
@@ -127,7 +127,6 @@ def test_should_add_to_retry_queue_if_notification_not_found_in_deliver_email_ta
app.celery.provider_tasks.deliver_email.retry.assert_called_with(queue="retry-tasks")
@pytest.mark.skip(reason="Needs updating for TTS: Failing for unknown reason")
@pytest.mark.parametrize(
'exception_class', [
Exception(),
@@ -149,7 +148,6 @@ def test_should_go_into_technical_error_if_exceeds_retries_on_deliver_email_task
assert sample_notification.status == 'technical-failure'
@pytest.mark.skip(reason="Needs updating for TTS: Failing for unknown reason")
def test_should_technical_error_and_not_retry_if_EmailClientNonRetryableException(sample_notification, mocker):
mocker.patch(
'app.delivery.send_to_providers.send_email_to_provider',