#NEWLINE# def test_bad_padding_in_base64_payload( self ) : #NEWLINE# #INDENT# source = textwrap . dedent ( '            Subject: test\n            MIME-Version: 1.0\n            Content-Type: text/plain; charset="utf-8"\n            Content-Transfer-Encoding: base64\n\n            dmk\n            ' ) #NEWLINE# msg = self . _str_msg ( source ) #NEWLINE# with self . _raise_point ( errors . InvalidBase64PaddingDefect ) : #NEWLINE# #INDENT# payload = msg . get_payload ( decode = True ) #NEWLINE# #UNINDENT# if self . raise_expected : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# self . assertEqual ( source , b'vi' ) #NEWLINE# self . assertDefectsEqual ( self . get_defects ( msg ) , [ errors . InvalidBase64PaddingDefect ] )