-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Determine build failure reason and include in data given to frontend …
…and email sent to user. (#67) * Add option to send copy of build failure email (and recipe request email) to a second (admin) address.
- Loading branch information
Showing
8 changed files
with
190 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,6 +60,7 @@ def test_send_email(mocker): | |
emailConfig = EmailConfig( | ||
fromAddr="{}@domain.com", | ||
toAddr="{}@other-domain.com", | ||
adminAddr="[email protected]", | ||
smtp="host.mail.com", | ||
localHostname="something", | ||
) | ||
|
@@ -72,6 +73,13 @@ def test_send_email(mocker): | |
mock_SMTP.return_value.sendmail.call_args[0][0] | ||
== "[email protected]" | ||
) | ||
assert mock_SMTP.return_value.sendmail.call_args[0][1] == [ | ||
"[email protected]", | ||
"[email protected]", | ||
] | ||
|
||
send_email(emailConfig, "MESSAGE2", "SUBJECT2", "USERNAME2", False) | ||
assert mock_SMTP.return_value.sendmail.call_count == 3 | ||
assert mock_SMTP.return_value.sendmail.call_args[0][1] == [ | ||
"[email protected]" | ||
] | ||
|
@@ -82,4 +90,4 @@ def test_send_email(mocker): | |
emailConfig = EmailConfig() | ||
|
||
send_email(emailConfig, "MESSAGE3", "SUBJECT3", "USERNAME3") | ||
assert mock_SMTP.return_value.sendmail.call_count == 2 | ||
assert mock_SMTP.return_value.sendmail.call_count == 3 |