mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-05 02:41:14 -05:00
Mock out some SQS calls
This commit is contained in:
@@ -200,6 +200,9 @@ def test_send_notification_uses_priority_queue_when_template_is_marked_as_priori
|
|||||||
notification_type,
|
notification_type,
|
||||||
key_send_to,
|
key_send_to,
|
||||||
send_to):
|
send_to):
|
||||||
|
|
||||||
|
mocker.patch('app.celery.provider_tasks.deliver_{}.apply_async'.format(notification_type))
|
||||||
|
|
||||||
sample = create_sample_template(
|
sample = create_sample_template(
|
||||||
notify_db,
|
notify_db,
|
||||||
notify_db_session,
|
notify_db_session,
|
||||||
@@ -248,11 +251,13 @@ def test_post_sms_notification_returns_400_if_not_allowed_to_send_int_sms(client
|
|||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
def test_post_sms_notification_returns_201_if_allowed_to_send_int_sms(notify_db, notify_db_session, client):
|
def test_post_sms_notification_returns_201_if_allowed_to_send_int_sms(notify_db, notify_db_session, client, mocker):
|
||||||
|
|
||||||
service = sample_service(notify_db, notify_db_session, can_send_international_sms=True)
|
service = sample_service(notify_db, notify_db_session, can_send_international_sms=True)
|
||||||
template = create_sample_template(notify_db, notify_db_session, service=service)
|
template = create_sample_template(notify_db, notify_db_session, service=service)
|
||||||
|
|
||||||
|
mocker.patch('app.celery.provider_tasks.deliver_sms.apply_async')
|
||||||
|
|
||||||
data = {
|
data = {
|
||||||
'phone_number': '20-12-1234-1234',
|
'phone_number': '20-12-1234-1234',
|
||||||
'template_id': template.id
|
'template_id': template.id
|
||||||
|
|||||||
Reference in New Issue
Block a user