#NEWLINE# @ defer . inlineCallbacks #NEWLINE# def test_custom_received_header( self ) : #NEWLINE# #INDENT# self . runtime_environment . configure ( ) #NEWLINE# self . create_smtp_server ( received_header = 'proto, helo, origin, recipients: "Received: by test_custom_header.local"' ) #NEWLINE# self . application . startService ( ) #NEWLINE# self . addCleanup ( self . application . stopService ) #NEWLINE# self . server . processor_dependency = self . processor_dependency #NEWLINE# ( yield smtp_provider . send_mail ( 'foo@foo.com' , 'bar@bar.com' , 'Test message' , port = self . port ) ) #NEWLINE# self . assertEquals ( len ( self . processor . batons ) , 1 ) #NEWLINE# baton = self . processor . batons [ 0 ] #NEWLINE# self . assertEquals ( baton [ 'message' ] [ 'Received' ] , 'by test_custom_header.local' )