#NEWLINE# @ override_settings ( EMAIL_BACKEND = 'djmail.backends.celery.EmailBackend' , DJMAIL_REAL_BACKEND = 'testing.mocks.BrokenEmailBackend' , DJMAIL_MAX_RETRY_NUMBER = 2 ) #NEWLINE# def test_failing_retry_send_02( self ) : #NEWLINE# #INDENT# message_model = models . Message . from_email_message ( self . email ) #NEWLINE# message_model . status = models . STATUS_FAILED #NEWLINE# message_model . retry_count = 3 #NEWLINE# message_model . save ( ) #NEWLINE# core . _mark_discarded_messages ( ) #NEWLINE# message_model_2 = models . Message . objects . get ( pk = self . pk ) #NEWLINE# self . assertEqual ( message_model_2 . retry_count , 3 ) #NEWLINE# self . assertEqual ( message_model_2 . status , models . STATUS_DISCARDED )