📜  django send_mail 在测试用例中不起作用 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:03.054000             🧑  作者: Mango

代码示例1
# 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....