mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-13 14:11:15 -05:00
Created an endpoint to test how the incoming messages from MMG will work.
So this just prints the response to logs, removing the phone number first. Then returns the requested RECEIVED.
This commit is contained in:
18
tests/app/notifications/test_receive_notification.py
Normal file
18
tests/app/notifications/test_receive_notification.py
Normal file
@@ -0,0 +1,18 @@
|
||||
from flask import json
|
||||
|
||||
|
||||
def test_receive_notification_returns_received_to_mmg(client):
|
||||
data = {"ID": "1234",
|
||||
"MSISDN": "447700900855",
|
||||
"Message": "Some message to notify",
|
||||
"Trigger": "Trigger?",
|
||||
"Number": "40604",
|
||||
"Channel": "SMS",
|
||||
"DateReceived": "2012-06-27-12:33:00"
|
||||
}
|
||||
response = client.post(path='/notifications/sms/receive/mmg',
|
||||
data=json.dumps(data),
|
||||
headers=[('Content-Type', 'application/json')])
|
||||
|
||||
assert response.status_code == 200
|
||||
assert response.get_data(as_text=True) == 'RECEIVED'
|
||||
Reference in New Issue
Block a user