#NEWLINE# @ mock . patch ( 'os_client_config.config.OpenStackConfig._load_vendor_file' ) #NEWLINE# @ mock . patch ( 'os_client_config.config.OpenStackConfig._load_config_file' ) #NEWLINE# def test_shell_args_precedence_1( self , config_mock , vendor_mock ) : #NEWLINE# #INDENT# config_mock . return_value = ( 'file.yaml' , copy . deepcopy ( CLOUD_2 ) ) #NEWLINE# vendor_mock . return_value = ( 'file.yaml' , copy . deepcopy ( PUBLIC_1 ) ) #NEWLINE# _shell = make_shell ( ) #NEWLINE# fake_execute ( _shell , '--os-cloud megacloud list user' ) #NEWLINE# self . assertEqual ( 'megacloud' , _shell . cloud . name ) #NEWLINE# self . assertEqual ( DEFAULT_AUTH_URL , _shell . cloud . config [ 'auth' ] [ 'auth_url' ] ) #NEWLINE# self . assertEqual ( 'cake' , _shell . cloud . config [ 'donut' ] ) #NEWLINE# self . assertEqual ( 'heart-o-gold' , _shell . cloud . config [ 'auth' ] [ 'project_name' ] ) #NEWLINE# self . assertEqual ( 'zaphod' , _shell . cloud . config [ 'auth' ] [ 'username' ] ) #NEWLINE# self . assertEqual ( 'occ-env' , _shell . cloud . config [ 'region_name' ] )