#NEWLINE# def test_missing_start_boundary( self ) : #NEWLINE# #INDENT# source = textwrap . dedent ( '            Content-Type: multipart/mixed; boundary="AAA"\n            From: Mail Delivery Subsystem <xxx@example.com>\n            To: yyy@example.com\n\n            --AAA\n\n            Stuff\n\n            --AAA\n            Content-Type: message/rfc822\n\n            From: webmaster@python.org\n            To: zzz@example.com\n            Content-Type: multipart/mixed; boundary="BBB"\n\n            --BBB--\n\n            --AAA--\n\n            ' ) #NEWLINE# with self . _raise_point ( errors . StartBoundaryNotFoundDefect ) : #NEWLINE# #INDENT# outer = self . _str_msg ( source ) #NEWLINE# #UNINDENT# if self . raise_expected : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# bad = outer . get_payload ( 1 ) . get_payload ( 0 ) #NEWLINE# self . assertEqual ( len ( self . get_defects ( bad ) ) , 1 ) #NEWLINE# self . assertTrue ( isinstance ( self . get_defects ( bad ) [ 0 ] , errors . StartBoundaryNotFoundDefect ) )