-
Notifications
You must be signed in to change notification settings - Fork 729
Allow creation of Mail from EmailMessage #631
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow creation of Mail from EmailMessage #631
Conversation
Codecov Report
@@ Coverage Diff @@
## v4 #631 +/- ##
==========================================
+ Coverage 84.38% 84.54% +0.15%
==========================================
Files 37 36 -1
Lines 967 977 +10
Branches 108 108
==========================================
+ Hits 816 826 +10
Misses 93 93
Partials 58 58
Continue to review full report at Codecov.
|
839deb4 to
7eddee4
Compare
|
Hello @cmccandless, |
|
This is awesome @cmccandless! Could you please merge this into the v4 branch? Thanks! |
7eddee4 to
064978b
Compare
064978b to
6909a88
Compare
6909a88 to
8e4e721
Compare
misterdorm
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
test/test_mail.py
Outdated
| self.assertEqual(mail.from_email.email, 'test@example.com') | ||
| self.assertEqual(len(mail.personalizations), 1) | ||
| self.assertEqual(len(mail.personalizations[0].tos), 1) | ||
| self.assertDictEqual(mail.personalizations[0].tos[0], {'email': 'test@sendgrid.com'}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Python docs show that assertEqual will already use assertDictEqual to compare dicts by default and that it isn't necessary to call it directly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to know! I'll make the correction.
assertEqual will call assertDictEqual
Fixes #571
Checklist
Short description of what this PR does: