#NEWLINE# def test_unknown_encoding( self ) : #NEWLINE# #INDENT# tmp = self . _get_tempfile ( ) #NEWLINE# code = textwrap . dedent ( "\n        write_files:\n        -   content: NDI=\n            path: {}\n            permissions: '0o466'\n        " . format ( tmp ) ) #NEWLINE# with testutils . LogSnatcher ( 'cloudbaseinit.plugins.common.userdataplugins.cloudconfigplugins.write_files' ) as snatcher : #NEWLINE# #INDENT# self . plugin . process_non_multipart ( self ) #NEWLINE# #UNINDENT# self . assertTrue ( os . path . exists ( tmp ) , 'Expected path does not exist.' ) #NEWLINE# with open ( tmp ) as stream : #NEWLINE# #INDENT# self . assertEqual ( 'NDI=' , stream . read ( ) ) #NEWLINE# #UNINDENT# self . assertEqual ( [ 'Unknown encoding, doing nothing.' ] , snatcher . output )