#NEWLINE# @ override_settings ( EMAIL_BACKEND = 'djmail.backends.default.EmailBackend' , DJMAIL_REAL_BACKEND = 'django.core.mail.backends.locmem.EmailBackend' ) #NEWLINE# def test_simple_send_email_1( self ) : #NEWLINE# #INDENT# class SimpleTemplateMail ( TemplateMail ) : #NEWLINE# #INDENT# name = 'test_email1' #NEWLINE# #UNINDENT# email = SimpleTemplateMail ( ) #NEWLINE# email . send ( 'to@example.com' , { #NEWLINE# #INDENT# 'name' : 'foo' , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertEqual ( len ( mail . outbox ) , 1 ) #NEWLINE# self . assertEqual ( models . Message . objects . count ( ) , 1 ) #NEWLINE# m = mail . outbox [ 0 ] #NEWLINE# self . assertEqual ( m . subject , 'Subject1: foo' ) #NEWLINE# self . assertEqual ( m . body , '<b>Mail1: foo</b>\n' )