-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
32 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,5 +10,4 @@ pytest==6.2.5 | |
pytest-cov==3.0.0 | ||
tox==3.8.5 | ||
twine==3.3.0 | ||
typed-ast==1.5.1 | ||
wheel |
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 |
---|---|---|
|
@@ -727,3 +727,28 @@ def test_tracking_config(self): | |
assert not tracking_settings["click_tracking"]["enable"] | ||
assert "ganalytics" in tracking_settings | ||
assert tracking_settings["ganalytics"]["utm_source"] == "my-source" | ||
|
||
def test_reply_to_list(self): | ||
msg = EmailMessage( | ||
subject="Hello, World!", | ||
body="Hello, World!", | ||
from_email="Sam Smith <[email protected]>", | ||
to=["John Doe <[email protected]>", "[email protected]"], | ||
cc=["Stephanie Smith <[email protected]>"], | ||
bcc=["Sarah Smith <[email protected]>"], | ||
) | ||
|
||
msg.reply_to_list = ["John Doe <[email protected]>", "[email protected]"] | ||
|
||
mail = self.backend._build_sg_mail(msg) | ||
|
||
reply_to_list = mail.get("reply_to_list") | ||
if SENDGRID_5: | ||
assert not reply_to_list | ||
else: | ||
assert reply_to_list | ||
assert len(reply_to_list) == 2 | ||
assert reply_to_list[0].get("email") == "[email protected]" | ||
assert reply_to_list[0].get("name") == "John Doe" | ||
assert reply_to_list[1].get("email") == "[email protected]" | ||
assert not reply_to_list[1].get("name") |