mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-03 09:51:11 -05:00
receive notifications
This commit is contained in:
@@ -277,7 +277,7 @@
|
|||||||
"filename": "tests/app/notifications/test_receive_notification.py",
|
"filename": "tests/app/notifications/test_receive_notification.py",
|
||||||
"hashed_secret": "913a73b565c8e2c8ed94497580f619397709b8b6",
|
"hashed_secret": "913a73b565c8e2c8ed94497580f619397709b8b6",
|
||||||
"is_verified": false,
|
"is_verified": false,
|
||||||
"line_number": 24,
|
"line_number": 25,
|
||||||
"is_secret": false
|
"is_secret": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -285,7 +285,7 @@
|
|||||||
"filename": "tests/app/notifications/test_receive_notification.py",
|
"filename": "tests/app/notifications/test_receive_notification.py",
|
||||||
"hashed_secret": "d70eab08607a4d05faa2d0d6647206599e9abc65",
|
"hashed_secret": "d70eab08607a4d05faa2d0d6647206599e9abc65",
|
||||||
"is_verified": false,
|
"is_verified": false,
|
||||||
"line_number": 54,
|
"line_number": 55,
|
||||||
"is_secret": false
|
"is_secret": false
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -384,5 +384,5 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"generated_at": "2024-11-11T16:49:37Z"
|
"generated_at": "2024-11-11T20:34:04Z"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ from app.notifications.receive_notifications import (
|
|||||||
create_inbound_sms_object,
|
create_inbound_sms_object,
|
||||||
fetch_potential_service,
|
fetch_potential_service,
|
||||||
has_inbound_sms_permissions,
|
has_inbound_sms_permissions,
|
||||||
|
receive_sns_sms,
|
||||||
unescape_string,
|
unescape_string,
|
||||||
)
|
)
|
||||||
from tests.app.db import (
|
from tests.app.db import (
|
||||||
@@ -369,3 +370,17 @@ def test_fetch_potential_service_cant_find_it(mock_dao):
|
|||||||
mock_dao.return_value = create_service()
|
mock_dao.return_value = create_service()
|
||||||
found_service = fetch_potential_service(234, "sns")
|
found_service = fetch_potential_service(234, "sns")
|
||||||
assert found_service is False
|
assert found_service is False
|
||||||
|
|
||||||
|
|
||||||
|
def test_receive_sns_sms_inbound_disabled(mocker):
|
||||||
|
mocker.patch(
|
||||||
|
"app.notifications.receive_notifications.current_app.config",
|
||||||
|
{"RECEIVE_INBOUND_SMS": False},
|
||||||
|
)
|
||||||
|
response, status_code = receive_sns_sms()
|
||||||
|
|
||||||
|
assert status_code == 200
|
||||||
|
assert response.json == {
|
||||||
|
"result": "success",
|
||||||
|
"message": "SMS-SNS callback succeeded",
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user