#NEWLINE# def test_receive_stream_email_messages_empty_body( self ) : #NEWLINE# #INDENT# self . login ( 'hamlet@zulip.com' ) #NEWLINE# user_profile = get_user_profile_by_email ( 'hamlet@zulip.com' ) #NEWLINE# self . subscribe_to_stream ( user_profile . email , 'Denmark' ) #NEWLINE# stream = get_stream ( 'Denmark' , user_profile . realm ) #NEWLINE# stream_to_address = encode_email_address ( stream ) #NEWLINE# headers = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# headers [ 'Reply-To' ] = 'othello@zulip.com' #NEWLINE# incoming_valid_message = MIMEText ( '' ) #NEWLINE# incoming_valid_message [ 'Subject' ] = 'TestStreamEmailMessages Subject' #NEWLINE# incoming_valid_message [ 'From' ] = 'hamlet@zulip.com' #NEWLINE# incoming_valid_message [ 'To' ] = stream_to_address #NEWLINE# incoming_valid_message [ 'Reply-to' ] = 'othello@zulip.com' #NEWLINE# exception_message = '' #NEWLINE# debug_info = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# try : #NEWLINE# #INDENT# process_stream_message ( incoming_valid_message [ 'To' ] , incoming_valid_message [ 'Subject' ] , incoming_valid_message , debug_info ) #NEWLINE# #UNINDENT# except ZulipEmailForwardError as e : #NEWLINE# #INDENT# exception_message = e . message #NEWLINE# #UNINDENT# self . assertEqual ( exception_message , 'Unable to find plaintext or HTML message body' )