mirror of
https://github.com/GSA/notifications-api.git
synced 2026-09-11 10:28:55 -04:00
Little test updates
This commit is contained in:
@@ -1048,9 +1048,7 @@ def test_send_notification_uses_priority_queue_when_template_is_marked_as_priori
|
|||||||
mocked.assert_called_once_with([notification_id], queue='priority')
|
mocked.assert_called_once_with([notification_id], queue='priority')
|
||||||
|
|
||||||
|
|
||||||
def test_should_allow_store_original_number_on_sms_notification(notify_api, sample_template, mocker):
|
def test_should_allow_store_original_number_on_sms_notification(client, sample_template, mocker):
|
||||||
with notify_api.test_request_context():
|
|
||||||
with notify_api.test_client() as client:
|
|
||||||
mocked = mocker.patch('app.celery.provider_tasks.deliver_sms.apply_async')
|
mocked = mocker.patch('app.celery.provider_tasks.deliver_sms.apply_async')
|
||||||
mocker.patch('app.encryption.encrypt', return_value="something_encrypted")
|
mocker.patch('app.encryption.encrypt', return_value="something_encrypted")
|
||||||
|
|
||||||
@@ -1077,9 +1075,7 @@ def test_should_allow_store_original_number_on_sms_notification(notify_api, samp
|
|||||||
assert '+(44) 7700-900 855' == notifications[0].to
|
assert '+(44) 7700-900 855' == notifications[0].to
|
||||||
|
|
||||||
|
|
||||||
def test_should_not_allow_international_number_on_sms_notification(notify_api, sample_template, mocker):
|
def test_should_not_allow_international_number_on_sms_notification(client, sample_template, mocker):
|
||||||
with notify_api.test_request_context():
|
|
||||||
with notify_api.test_client() as client:
|
|
||||||
mocked = mocker.patch('app.celery.provider_tasks.deliver_sms.apply_async')
|
mocked = mocker.patch('app.celery.provider_tasks.deliver_sms.apply_async')
|
||||||
mocker.patch('app.encryption.encrypt', return_value="something_encrypted")
|
mocker.patch('app.encryption.encrypt', return_value="something_encrypted")
|
||||||
|
|
||||||
@@ -1102,9 +1098,7 @@ def test_should_not_allow_international_number_on_sms_notification(notify_api, s
|
|||||||
assert error_json['message']['to'][0] == 'Cannot send to international mobile numbers'
|
assert error_json['message']['to'][0] == 'Cannot send to international mobile numbers'
|
||||||
|
|
||||||
|
|
||||||
def test_should_allow_international_number_on_sms_notification(notify_api, notify_db, notify_db_session, mocker):
|
def test_should_allow_international_number_on_sms_notification(client, notify_db, notify_db_session, mocker):
|
||||||
with notify_api.test_request_context():
|
|
||||||
with notify_api.test_client() as client:
|
|
||||||
mocker.patch('app.celery.provider_tasks.deliver_sms.apply_async')
|
mocker.patch('app.celery.provider_tasks.deliver_sms.apply_async')
|
||||||
mocker.patch('app.encryption.encrypt', return_value="something_encrypted")
|
mocker.patch('app.encryption.encrypt', return_value="something_encrypted")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user