send theme escalation emails to "background-themes@mozilla.com" (and Reply-To for approval/rejection emails)

This commit is contained in:
Chris Van 2013-03-27 22:54:51 -07:00
Родитель 8744231826
Коммит 38da857711
3 изменённых файлов: 12 добавлений и 11 удалений

Просмотреть файл

@ -74,6 +74,7 @@ MANAGERS = ADMINS
FLIGTAR = 'amo-admins@mozilla.org'
EDITORS_EMAIL = 'amo-editors@mozilla.org'
SENIOR_EDITORS_EMAIL = 'amo-admin-reviews@mozilla.org'
THEMES_EMAIL = 'background-themes@mozilla.com'
MARKETPLACE_EMAIL = 'amo-marketplace@mozilla.org'
ABUSE_EMAIL = 'marketplace-abuse@mozilla.org'
NOBODY_EMAIL = 'nobody@mozilla.org'

Просмотреть файл

@ -56,7 +56,7 @@ def send_mail(cleaned_data, theme_lock):
elif action == rvw.ACTION_FLAG:
subject = _('Theme submission flagged for review')
template = 'reviewers/themes/emails/flag_reviewer.html'
emails = [settings.SENIOR_EDITORS_EMAIL]
emails = [settings.THEMES_EMAIL]
theme.addon.update(status=amo.STATUS_REVIEW_PENDING)
# Send another email to the user notifying them that their Theme has
@ -64,7 +64,7 @@ def send_mail(cleaned_data, theme_lock):
send_mail_jinja(_('A problem with your Theme submission'),
'reviewers/themes/emails/flag_user.html', context,
recipient_list=emails,
headers={'Reply-To': theme_lock.reviewer.email})
headers={'Reply-To': settings.THEMES_EMAIL})
elif action == rvw.ACTION_MOREINFO:
subject = _('A question about your Theme submission')
@ -83,4 +83,4 @@ def send_mail(cleaned_data, theme_lock):
send_mail_jinja(subject, template, context,
recipient_list=emails,
headers={'Reply-To': theme_lock.reviewer.email})
headers={'Reply-To': settings.THEMES_EMAIL})

Просмотреть файл

@ -2116,7 +2116,7 @@ class ThemeReviewTestMixin(object):
'theme': themes[0],
'reviewer_email': u'reviewer0@mozilla.com',
'base_url': 'http://testserver'},
headers={'Reply-To': u'reviewer0@mozilla.com'},
headers={'Reply-To': settings.THEMES_EMAIL},
recipient_list=set([])),
mock.call('A problem with your Theme submission',
'reviewers/themes/emails/flag_user.html',
@ -2124,23 +2124,23 @@ class ThemeReviewTestMixin(object):
'comment': u'flag',
'theme': themes[1],
'base_url': 'http://testserver'},
headers={'Reply-To': u'reviewer0@mozilla.com'},
recipient_list=['amo-admin-reviews@mozilla.org']),
headers={'Reply-To': settings.THEMES_EMAIL},
recipient_list=[settings.THEMES_EMAIL]),
mock.call('Theme submission flagged for review',
'reviewers/themes/emails/flag_reviewer.html',
{'reason': None,
'comment': u'flag',
'theme': themes[1],
'base_url': 'http://testserver'},
headers={'Reply-To': u'reviewer0@mozilla.com'},
recipient_list=['amo-admin-reviews@mozilla.org']),
headers={'Reply-To': settings.THEMES_EMAIL},
recipient_list=[settings.THEMES_EMAIL]),
mock.call('A problem with your Theme submission',
'reviewers/themes/emails/reject.html',
{'reason': None,
'comment': u'duplicate',
'theme': themes[2],
'base_url': 'http://testserver'},
headers={'Reply-To': u'reviewer0@mozilla.com'},
headers={'Reply-To': settings.THEMES_EMAIL},
recipient_list=set([])),
mock.call('A problem with your Theme submission',
'reviewers/themes/emails/reject.html',
@ -2148,7 +2148,7 @@ class ThemeReviewTestMixin(object):
'comment': u'reject',
'theme': themes[3],
'base_url': 'http://testserver'},
headers={'Reply-To': u'reviewer0@mozilla.com'},
headers={'Reply-To': settings.THEMES_EMAIL},
recipient_list=set([])),
mock.call('Thanks for submitting your Theme',
'reviewers/themes/emails/approve.html',
@ -2156,7 +2156,7 @@ class ThemeReviewTestMixin(object):
'comment': u'',
'theme': themes[4],
'base_url': 'http://testserver'},
headers={'Reply-To': u'reviewer0@mozilla.com'},
headers={'Reply-To': settings.THEMES_EMAIL},
recipient_list=set([]))
]
eq_(send_mail_jinja_mock.call_args_list[0], expected_calls[0])