update research mode email callbacks to add process-ses-response task to queue

this involved:
* moving that task to callback_tasks to prevent circular imports
* updating the dummy research mode callbacks (with actual SNS messages from the
  ses simulator emails)
* refactoring tests
This commit is contained in:
Leo Hemsted
2017-11-17 13:41:45 +00:00
parent 0e477b7715
commit d2154451e5
11 changed files with 158 additions and 106 deletions

View File

@@ -126,7 +126,7 @@ def send_email_to_provider(notification):
notification.billable_units = 0
notification.reference = reference
update_notification(notification, provider)
send_email_response(provider.get_name(), reference, notification.to)
send_email_response(reference, notification.to)
else:
from_address = '"{}" <{}@{}>'.format(service.name, service.email_from,
current_app.config['NOTIFY_EMAIL_DOMAIN'])