fix tests

This commit is contained in:
jimmoffet
2022-09-30 10:59:48 -04:00
parent 1161e2c6cb
commit 48af6f7c23
8 changed files with 20 additions and 80 deletions

View File

@@ -71,7 +71,7 @@ def test_notifications_ses_400_with_certificate(client):
def test_notifications_ses_200_autoconfirms_subscription(client, mocker):
mocker.patch("app.celery.process_ses_receipts_tasks.valid_sns_message", return_value=True)
mocker.patch("app.celery.process_ses_receipts_tasks.validate_sns_message", return_value=True)
requests_mock = mocker.patch("requests.get")
data = json.dumps({"Type": "SubscriptionConfirmation", "SubscribeURL": "https://foo"})
response = client.post(
@@ -85,7 +85,7 @@ def test_notifications_ses_200_autoconfirms_subscription(client, mocker):
def test_notifications_ses_200_call_process_task(client, mocker):
mocker.patch("app.celery.process_ses_receipts_tasks.valid_sns_message", return_value=True)
mocker.patch("app.celery.process_ses_receipts_tasks.validate_sns_message", return_value=True)
process_mock = mocker.patch("app.celery.process_ses_receipts_tasks.process_ses_results.apply_async")
data = {"Type": "Notification", "foo": "bar"}
json_data = json.dumps(data)