#NEWLINE# def test_make_persistent_password_file( self ) : #NEWLINE# #INDENT# filepath = ( '%(tempdir)s/%(node_uuid)s' % { #NEWLINE# #INDENT# 'tempdir' : tempfile . gettempdir ( ) , #NEWLINE# 'node_uuid' : filepath . info [ 'uuid' ] , #NEWLINE# #UNINDENT# } ) #NEWLINE# password = '' . join ( [ random . choice ( string . ascii_letters ) for n in range ( 16 ) ] ) #NEWLINE# console_utils . make_persistent_password_file ( filepath , password ) #NEWLINE# self . assertTrue ( os . path . exists ( filepath ) ) #NEWLINE# with open ( filepath ) as file : #NEWLINE# #INDENT# content = file . read ( ) #NEWLINE# #UNINDENT# self . assertEqual ( password , content ) #NEWLINE# os . unlink ( filepath )