#NEWLINE# def test_create_keystone_client_with_v2_version_omits_domain( self ) : #NEWLINE# #INDENT# self . set_up_keystone_mocks ( ) #NEWLINE# ( auth_kwargs , all_kwargs ) = self . make_auth_args ( ) #NEWLINE# all_kwargs [ 'auth_url' ] = 'http://auth_url/' #NEWLINE# auth_kwargs [ 'auth_url' ] = all_kwargs [ 'auth_url' ] #NEWLINE# keystone = osclients . Keystone ( mock . MagicMock ( ) , mock . sentinel , mock . sentinel ) #NEWLINE# client = keystone . _create_keystone_client ( all_kwargs , version = '2' ) #NEWLINE# auth_kwargs . pop ( 'user_domain_name' ) #NEWLINE# auth_kwargs . pop ( 'project_domain_name' ) #NEWLINE# auth_kwargs . pop ( 'domain_name' ) #NEWLINE# self . ksc_password . assert_called_once_with ( ** auth_kwargs ) #NEWLINE# self . ksc_session . Session . assert_called_once_with ( auth = self . ksc_identity . Password ( ) , timeout = mock . ANY , verify = mock . ANY ) #NEWLINE# self . ksc_client . Client . assert_called_once_with ( version = '2' , ** all_kwargs ) #NEWLINE# self . assertIs ( client , self . ksc_client . Client ( ) )