mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-01 15:46:07 -05:00
Refactor ApiKeys.secret and ServiceInboundApi.bearer_token to use the same encryption method and get rid of the duplicate code.
This commit is contained in:
@@ -21,7 +21,6 @@ def _post_notification(client, template, url, to):
|
||||
|
||||
def test_post_sms_contract(client, mocker, sample_template):
|
||||
mocker.patch('app.celery.provider_tasks.deliver_sms.apply_async')
|
||||
mocker.patch('app.encryption.encrypt', return_value="something_encrypted")
|
||||
|
||||
response_json = return_json_from_response(_post_notification(
|
||||
client, sample_template, url='/notifications/sms', to='07700 900 855'
|
||||
@@ -31,7 +30,6 @@ def test_post_sms_contract(client, mocker, sample_template):
|
||||
|
||||
def test_post_email_contract(client, mocker, sample_email_template):
|
||||
mocker.patch('app.celery.provider_tasks.deliver_email.apply_async')
|
||||
mocker.patch('app.encryption.encrypt', return_value="something_encrypted")
|
||||
|
||||
response_json = return_json_from_response(_post_notification(
|
||||
client, sample_email_template, url='/notifications/email', to='foo@bar.com'
|
||||
|
||||
Reference in New Issue
Block a user