#NEWLINE# def test_first_line_is_continuation_header( self ) : #NEWLINE# #INDENT# with self . _raise_point ( errors . FirstHeaderLineIsContinuationDefect ) : #NEWLINE# #INDENT# msg = self . _str_msg ( ' Line 1\nSubject: test\n\nbody' ) #NEWLINE# #UNINDENT# if self . raise_expected : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# self . assertEqual ( msg . keys ( ) , [ 'Subject' ] ) #NEWLINE# self . assertEqual ( msg . get_payload ( ) , 'body' ) #NEWLINE# self . assertEqual ( len ( self . get_defects ( msg ) ) , 1 ) #NEWLINE# self . assertDefectsEqual ( self . get_defects ( self ) , [ errors . FirstHeaderLineIsContinuationDefect ] ) #NEWLINE# self . assertEqual ( self . get_defects ( msg ) [ 0 ] . line , ' Line 1\n' )