-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #264 from akintolga/email-subject
[SDESK-1027] - Headline as subject of kill email
- Loading branch information
Showing
1 changed file
with
3 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,7 +40,7 @@ def test_send_email_kill_for_NZN(self): | |
with self.app.mail.record_messages() as outbox: | ||
assert len(outbox) == 0 | ||
article = { | ||
'headline': 'headline', | ||
'headline': 'Rugby world cup cancelled', | ||
'place': [{'qcode': 'NSW', 'name': 'NSW'}], | ||
'slugline': 'slugline', | ||
'dateline': { | ||
|
@@ -55,15 +55,14 @@ def test_send_email_kill_for_NZN(self): | |
} | ||
send_article_killed_email(article, ['[email protected]'], utcnow()) | ||
self.assertEqual(len(outbox), 1) | ||
self.assertEqual(outbox[0].subject, 'Transmission from circuit: E_KILL_') | ||
self.assertEqual(outbox[0].subject, 'Rugby world cup cancelled') | ||
self.assertIn('body', outbox[0].body) | ||
|
||
def test_send_email_kill_for_AAP(self): | ||
with self.app.app_context(): | ||
with self.app.mail.record_messages() as outbox: | ||
assert len(outbox) == 0 | ||
article = { | ||
'headline': 'headline', | ||
'place': [{'qcode': 'NSW', 'name': 'NSW'}], | ||
'slugline': 'slugline', | ||
'dateline': { | ||
|
@@ -78,5 +77,5 @@ def test_send_email_kill_for_AAP(self): | |
} | ||
send_article_killed_email(article, ['[email protected]'], utcnow()) | ||
self.assertEqual(len(outbox), 1) | ||
self.assertEqual(outbox[0].subject, 'Transmission from circuit: E_KILL_') | ||
self.assertEqual(outbox[0].subject, 'Kill Notification') | ||
self.assertIn('body', outbox[0].body) |