#NEWLINE# def test_backend_fails_to_send( self ) : #NEWLINE# #INDENT# alert_that_should_fail = Alert . objects . filter ( backend = 'EpicFail' ) [ 0 ] #NEWLINE# before_send = timezone . now ( ) #NEWLINE# alert_that_should_fail . send ( ) #NEWLINE# after_send = timezone . now ( ) #NEWLINE# self . assertTrue ( alert_that_should_fail . failed ) #NEWLINE# self . assertFalse ( alert_that_should_fail . is_sent ) #NEWLINE# self . assertTrue ( ( alert_that_should_fail . last_attempt is not None ) ) #NEWLINE# self . assertTrue ( ( alert_that_should_fail . last_attempt > before_send ) ) #NEWLINE# self . assertTrue ( ( alert_that_should_fail . last_attempt < after_send ) ) #NEWLINE# before_send = timezone . now ( ) #NEWLINE# alert_that_should_fail . send ( ) #NEWLINE# after_send = timezone . now ( ) #NEWLINE# self . assertFalse ( alert_that_should_fail . failed ) #NEWLINE# self . assertTrue ( alert_that_should_fail . is_sent ) #NEWLINE# self . assertTrue ( ( alert_that_should_fail . last_attempt is not None ) ) #NEWLINE# self . assertTrue ( ( alert_that_should_fail . last_attempt > after_send ) ) #NEWLINE# self . assertTrue ( ( alert_that_should_fail . last_attempt < after_send ) )