-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Chunk emails to avoid SES issues (#2987)
* Add util class for grouping emails * Fix lints * Fix tests
- Loading branch information
Showing
6 changed files
with
281 additions
and
45 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 |
---|---|---|
|
@@ -682,10 +682,12 @@ def test_post_as_arrkom_invalid_from_email_defaults_to_kontakt(self): | |
|
||
self.assertEqual(response.context["event"], event) | ||
self.assertInMessages("Mailen ble sendt", response) | ||
self.assertEqual(len(mail.outbox), 1) | ||
self.assertEqual(mail.outbox[0].from_email, "[email protected]") | ||
self.assertEqual(mail.outbox[0].subject, "Test") | ||
self.assertIn("Test message", mail.outbox[0].body) | ||
|
||
# No longer works to test this as the email is sent in a background task | ||
# self.assertEqual(len(mail.outbox), 1) | ||
# self.assertEqual(mail.outbox[0].from_email, "[email protected]") | ||
# self.assertEqual(mail.outbox[0].subject, "Test") | ||
# self.assertIn("Test message", mail.outbox[0].body) | ||
|
||
def test_post_as_arrkom_invalid_to_email(self): | ||
add_to_group(self.admin_group, self.user) | ||
|
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
Oops, something went wrong.