notifications: Use call_consume_in_tests for email sending.

This adds a bit of test coverage with really no downside.
This commit is contained in:
Tim Abbott 2017-11-26 11:45:09 -08:00
parent 0e0a8a2b14
commit 9fcdb6c83a
1 changed files with 2 additions and 3 deletions

View File

@ -6,8 +6,7 @@ from django.conf import settings
from django.template import loader
from django.utils.timezone import now as timezone_now
from zerver.decorator import statsd_increment
from zerver.lib.send_email import send_future_email, \
send_email_from_dict, FromAddress
from zerver.lib.send_email import send_future_email, FromAddress
from zerver.lib.queue import queue_json_publish
from zerver.models import (
Recipient,
@ -380,7 +379,7 @@ def do_send_missedmessage_events_reply_in_zulip(user_profile, missed_messages, m
'from_address': from_address,
'reply_to_email': formataddr((reply_to_name, reply_to_address)),
'context': context}
queue_json_publish("missedmessage_email_senders", email_dict, send_email_from_dict)
queue_json_publish("missedmessage_email_senders", email_dict)
user_profile.last_reminder = timezone_now()
user_profile.save(update_fields=['last_reminder'])