mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-31 23:26:23 -05:00
Implemented the REST endpoint to communicate with the new send-to-provider code
- this allows us to send a notification to a provider by means of an API call - This is in addition to the celery code. - idea is that we can use this method to help speed up throughput by generating API traffic by node/lambda etc to supplement the celery code in times of high load.
This commit is contained in:
@@ -66,11 +66,10 @@ def test_should_add_to_retry_queue_if_notification_not_found_in_deliver_sms_task
|
||||
|
||||
|
||||
def test_should_call_send_sms_to_provider_from_send_sms_to_provider_task(
|
||||
notify_db,
|
||||
notify_db_session,
|
||||
sample_notification,
|
||||
mocker):
|
||||
|
||||
notify_db,
|
||||
notify_db_session,
|
||||
sample_notification,
|
||||
mocker):
|
||||
mocker.patch('app.delivery.send_to_providers.send_sms_to_provider')
|
||||
|
||||
send_sms_to_provider(sample_notification.service_id, sample_notification.id)
|
||||
@@ -93,11 +92,10 @@ def test_should_add_to_retry_queue_if_notification_not_found_in_send_sms_to_prov
|
||||
|
||||
|
||||
def test_should_call_send_email_to_provider_from_deliver_email_task(
|
||||
notify_db,
|
||||
notify_db_session,
|
||||
sample_notification,
|
||||
mocker):
|
||||
|
||||
notify_db,
|
||||
notify_db_session,
|
||||
sample_notification,
|
||||
mocker):
|
||||
mocker.patch('app.delivery.send_to_providers.send_email_to_provider')
|
||||
|
||||
deliver_email(sample_notification.id)
|
||||
@@ -119,11 +117,10 @@ def test_should_add_to_retry_queue_if_notification_not_found_in_deliver_email_ta
|
||||
|
||||
|
||||
def test_should_call_send_email_to_provider_from_email_task(
|
||||
notify_db,
|
||||
notify_db_session,
|
||||
sample_notification,
|
||||
mocker):
|
||||
|
||||
notify_db,
|
||||
notify_db_session,
|
||||
sample_notification,
|
||||
mocker):
|
||||
mocker.patch('app.delivery.send_to_providers.send_email_to_provider')
|
||||
|
||||
send_email_to_provider(sample_notification.service_id, sample_notification.id)
|
||||
|
||||
Reference in New Issue
Block a user