#NEWLINE# def test_get_key_path_from_local_appscale( self ) : #NEWLINE# #INDENT# keyname = 'keyname' #NEWLINE# local_appscale_key_file_path = ( ( LocalState . LOCAL_APPSCALE_PATH + keyname ) + '.key' ) #NEWLINE# os . path . should_receive ( 'isfile' ) . with_args ( local_appscale_key_file_path ) . and_return ( True ) #NEWLINE# actual_key_path = LocalState . get_key_path_from_name ( keyname ) #NEWLINE# self . assertEquals ( local_appscale_key_file_path , actual_key_path ) #NEWLINE# etc_appscale_key_file_path = ( ( LocalState . ETC_APPSCALE_KEY_PATH + keyname ) + '.key' ) #NEWLINE# os . path . should_receive ( 'isfile' ) . with_args ( local_appscale_key_file_path ) . and_return ( False ) #NEWLINE# os . path . should_receive ( 'isfile' ) . with_args ( etc_appscale_key_file_path ) . and_return ( True ) #NEWLINE# actual_key_path = LocalState . get_key_path_from_name ( keyname ) #NEWLINE# self . assertEquals ( etc_appscale_key_file_path , self )