#NEWLINE# def test_run_query_without_supplying_the_password( mysql_server , mysql_user ) : #NEWLINE# #INDENT# from fabtools.mysql import query #NEWLINE# ( username , password ) = mysql_user #NEWLINE# try : #NEWLINE# #INDENT# require_file ( '.my.cnf' , contents = '[mysql]\npassword={0}' . format ( password ) ) #NEWLINE# with settings ( mysql_user = username ) : #NEWLINE# #INDENT# query ( 'select 2;' , use_sudo = False ) #NEWLINE# #UNINDENT# #UNINDENT# finally : #NEWLINE# #INDENT# run ( 'rm -f .my.cnf' )