Wired in a simple callback to handle SNS notifications from S3

S3 will send a message when a file lands - which will trigger processing of DVLA responses.
This commit is contained in:
Martyn Inglis
2017-04-25 14:56:16 +01:00
parent a016a601c9
commit e977e7cee4
3 changed files with 53 additions and 0 deletions

View File

@@ -13,6 +13,16 @@ from app.models import NotificationStatistics
from tests.app.conftest import sample_notification as create_sample_notification
def test_dvla_callback_should_not_need_auth(client):
data = json.dumps({"somekey": "somevalue"})
response = client.post(
path='/notifications/letter/dvla',
data=data,
headers=[('Content-Type', 'application/json')])
assert response.status_code == 200
def test_firetext_callback_should_not_need_auth(client, mocker):
mocker.patch('app.statsd_client.incr')
response = client.post(