-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support multiple email recipients (#113)
* support multiple email recipients * support multiple email recipients --------- Co-authored-by: Kumar Abhishek <[email protected]>
- Loading branch information
1 parent
d7db1bb
commit f467a78
Showing
2 changed files
with
7 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ def test_send_notification_success(_mock_context): | |
email_handler = SparkExpectationsEmailPluginImpl() | ||
_mock_context.get_enable_mail = True | ||
_mock_context.get_mail_from = "[email protected]" | ||
_mock_context.get_to_mail = "receiver@example.com" | ||
_mock_context.get_to_mail = "[email protected], receiver2@example.com" | ||
_mock_context.get_mail_subject = "Test Email" | ||
_mock_context.get_mail_smtp_server = "mailhost.example.com" | ||
_mock_context.get_mail_smtp_port = 587 | ||
|
@@ -27,7 +27,7 @@ def test_send_notification_success(_mock_context): | |
# assert | ||
mock_smtp.assert_called_with(_mock_context.get_mail_smtp_server, _mock_context.get_mail_smtp_port) | ||
mock_smtp().starttls.assert_called() | ||
mock_smtp().sendmail.assert_called_with(_mock_context.get_mail_from, _mock_context.get_to_mail, | ||
mock_smtp().sendmail.assert_called_with(_mock_context.get_mail_from, [email.strip() for email in _mock_context.get_to_mail.split(",")], | ||
_mock_mltp().as_string()) | ||
mock_smtp().quit.assert_called() | ||
|
||
|