Added simple logging endpoint for fire text inbound SMS calls

- logs post data
- OK to log all as not currently in use so no real user data expected.
This commit is contained in:
Martyn Inglis
2017-06-01 08:21:18 +01:00
parent 3c416d3631
commit a7fd624db5
2 changed files with 5 additions and 4 deletions

View File

@@ -19,11 +19,12 @@ def test_receive_notification_returns_received_to_mmg(client):
def test_receive_notification_returns_received_to_firetext(client):
data = {"some": "thing"}
data = "source=07999999999&destination=07111111111&message=this is a message&time=2017-01-01 12:00:00"
response = client.post(
path='/notifications/sms/receive/firetext',
data=json.dumps(data),
headers=[('Content-Type', 'application/json')])
data=data,
headers=[('Content-Type', 'application/x-www-form-urlencoded')])
assert response.status_code == 200
result = json.loads(response.get_data(as_text=True))