diff --git a/lib/settings_base.py b/lib/settings_base.py index 2bb000e88d..c8f8c81ce8 100644 --- a/lib/settings_base.py +++ b/lib/settings_base.py @@ -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' diff --git a/mkt/reviewers/tasks.py b/mkt/reviewers/tasks.py index 44a213bbce..c48bf6c5c9 100644 --- a/mkt/reviewers/tasks.py +++ b/mkt/reviewers/tasks.py @@ -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}) diff --git a/mkt/reviewers/tests/test_views.py b/mkt/reviewers/tests/test_views.py index c210851dbd..43aac97599 100644 --- a/mkt/reviewers/tests/test_views.py +++ b/mkt/reviewers/tests/test_views.py @@ -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])