#NEWLINE# def test_missing_ending_boundary( self ) : #NEWLINE# #INDENT# source = textwrap . dedent ( '            To: 1@harrydomain4.com\n            Subject: Fwd: 1\n            MIME-Version: 1.0\n            Content-Type: multipart/alternative;\n             boundary="------------000101020201080900040301"\n\n            --------------000101020201080900040301\n            Content-Type: text/plain; charset=ISO-8859-1\n            Content-Transfer-Encoding: 7bit\n\n            Alternative 1\n\n            --------------000101020201080900040301\n            Content-Type: text/html; charset=ISO-8859-1\n            Content-Transfer-Encoding: 7bit\n\n            Alternative 2\n\n            ' ) #NEWLINE# with self . _raise_point ( errors . CloseBoundaryNotFoundDefect ) : #NEWLINE# #INDENT# msg = self . _str_msg ( source ) #NEWLINE# #UNINDENT# if self . raise_expected : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# self . assertEqual ( len ( msg . get_payload ( ) ) , 2 ) #NEWLINE# self . assertEqual ( msg . get_payload ( 1 ) . get_payload ( ) , 'Alternative 2\n' ) #NEWLINE# self . assertDefectsEqual ( self . get_defects ( msg ) , [ errors . CloseBoundaryNotFoundDefect ] )