Skip to content

Commit

Permalink
Merge pull request #264 from akintolga/email-subject
Browse files Browse the repository at this point in the history
[SDESK-1027] - Headline as subject of kill email
  • Loading branch information
Mayur Dhamanwala authored Mar 31, 2017
2 parents f9bb09f + dd2467d commit c79a114
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions server/aap/tests/send_email_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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': {
Expand All @@ -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': {
Expand All @@ -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)

0 comments on commit c79a114

Please sign in to comment.