Log error when sending email fails. Wrap recipients in a list instead of putting the logic inside Mailer _build_message().

This commit is contained in:
leigh-mil
2020-02-06 11:40:09 -05:00
parent 0f69a48bbe
commit b2da9de040
3 changed files with 5 additions and 4 deletions

View File

@@ -324,7 +324,7 @@ def test_dispatch_send_task_order_files(monkeypatch, app):
# Check that send_with_attachment was called with correct kwargs
mock.assert_called_once_with(
recipients=app.config.get("MICROSOFT_TASK_ORDER_EMAIL_ADDRESS"),
recipients=[app.config.get("MICROSOFT_TASK_ORDER_EMAIL_ADDRESS")],
subject=translate(
"email.task_order_sent.subject", {"to_number": task_order.number}
),