📅  最后修改于: 2022-03-11 14:46:03.054000             🧑  作者: Mango
# The Django test runner will actually configure a different email backend for you.
# To override it do the following
from django.test.utils import override_settings
@override_settings(
EMAIL_BACKEND='django.core.mail.backends.smtp.EmailBackend')
def test_send_email_with_real_SMTP(self):
# your code goes here....