Merge branch 'master' into vb-remove-ip-whitelist

This commit is contained in:
Venus Bailey
2017-12-19 16:47:51 +00:00
committed by GitHub
2 changed files with 2 additions and 3 deletions

View File

@@ -34,11 +34,11 @@ def receive_mmg_sms():
if not auth: if not auth:
current_app.logger.warning("Inbound sms (MMG) no auth header") current_app.logger.warning("Inbound sms (MMG) no auth header")
# abort(401) abort(401)
elif auth.username not in current_app.config['MMG_INBOUND_SMS_USERNAME'] \ elif auth.username not in current_app.config['MMG_INBOUND_SMS_USERNAME'] \
or auth.password not in current_app.config['MMG_INBOUND_SMS_AUTH']: or auth.password not in current_app.config['MMG_INBOUND_SMS_AUTH']:
current_app.logger.warning("Inbound sms (MMG) incorrect username ({}) or password".format(auth.username)) current_app.logger.warning("Inbound sms (MMG) incorrect username ({}) or password".format(auth.username))
# abort(403) abort(403)
inbound_number = strip_leading_forty_four(post_data['Number']) inbound_number = strip_leading_forty_four(post_data['Number'])

View File

@@ -428,7 +428,6 @@ def test_firetext_inbound_sms_auth(notify_db_session, notify_api, client, mocker
["", [], 401], ["", [], 401],
["testkey", [], 403], ["testkey", [], 403],
]) ])
@pytest.mark.skip(reason="aborts are disabled at the moment")
def test_mmg_inbound_sms_auth(notify_db_session, notify_api, client, mocker, auth, keys, status_code): def test_mmg_inbound_sms_auth(notify_db_session, notify_api, client, mocker, auth, keys, status_code):
mocker.patch("app.notifications.receive_notifications.tasks.send_inbound_sms_to_service.apply_async") mocker.patch("app.notifications.receive_notifications.tasks.send_inbound_sms_to_service.apply_async")