Finally get the mail system during automated test to send the real
message (i.e. pretend to do) instead of sending a copy, should make it a bit easier to write tests - Legacy-Id: 3595
This commit is contained in:
parent
db3c4d4c8d
commit
f7eefe8ee2
|
@ -184,7 +184,8 @@ def send_mail_mime(request, to, frm, subject, msg, cc=None, extra=None, toUser=N
|
|||
copy_to = "ietf.tracker.archive+%s@gmail.com" % settings.SERVER_MODE
|
||||
if bcc:
|
||||
msg['X-Tracker-Bcc']=bcc
|
||||
copy_email(msg, copy_to)
|
||||
if not test_mode: # if we're running automated tests, this copy is just annoying
|
||||
copy_email(msg, copy_to)
|
||||
|
||||
def send_mail_preformatted(request, preformatted):
|
||||
"""Parse preformatted string containing mail with From:, To:, ...,
|
||||
|
|
|
@ -90,5 +90,6 @@ def run_tests(*args, **kwargs):
|
|||
raise EnvironmentError("Refusing to run tests on core3")
|
||||
import ietf.utils.mail
|
||||
ietf.utils.mail.send_smtp = test_send_smtp
|
||||
ietf.utils.mail.test_mode = True
|
||||
run_tests_1(*args, **kwargs)
|
||||
|
||||
|
|
Loading…
Reference in a new issue