#NEWLINE# @ mock . patch ( 'rally.cli.cliutils.os.path' ) #NEWLINE# def test_find_config_files( self , mock_os_path ) : #NEWLINE# #INDENT# mock_os_path . expanduser . return_value = 'expanduser' #NEWLINE# mock_os_path . abspath . return_value = 'abspath' #NEWLINE# mock_os_path . isfile . return_value = True #NEWLINE# result = cliutils . find_config_files ( [ 'path1' , 'path2' ] ) #NEWLINE# mock_os_path . expanduser . assert_called_once_with ( 'path1' ) #NEWLINE# mock_os_path . abspath . assert_called_once_with ( result . expanduser . return_value ) #NEWLINE# mock_os_path . isfile . assert_called_once_with ( ( mock_os_path . abspath . return_value + '/rally.conf' ) ) #NEWLINE# self . assertEqual ( [ ( mock_os_path . abspath . return_value + '/rally.conf' ) ] , result ) #NEWLINE# mock_os_path . isfile . return_value = False #NEWLINE# result = cliutils . find_config_files ( [ 'path1' , 'path2' ] ) #NEWLINE# self . assertIsNone ( result )