#NEWLINE# def test_send( self ) : #NEWLINE# #INDENT# message = Bunch ( id = 'foo' ) #NEWLINE# interface = Mailer ( base_config ) #NEWLINE# with pytest . raises ( MailerNotRunning ) : #NEWLINE# #INDENT# interface . send ( message ) #NEWLINE# #UNINDENT# interface . start ( ) #NEWLINE# assert ( interface . send ( message_fail ) == ( message , True ) ) #NEWLINE# message_fail = Bunch ( id = 'bar' , die = True ) #NEWLINE# with pytest . raises ( Exception ) : #NEWLINE# #INDENT# interface . send ( message_fail ) #NEWLINE# #UNINDENT# interface . stop ( )