#NEWLINE# def test_uninstall_proxy_argument_in_resulting_command( self ) : #NEWLINE# #INDENT# pkg = 'pep8' #NEWLINE# proxy = 'salt-user:salt-passwd@salt-proxy:3128' #NEWLINE# mock = MagicMock ( return_value = { #NEWLINE# #INDENT# 'retcode' : 0 , #NEWLINE# 'stdout' : '' , #NEWLINE# #UNINDENT# } ) #NEWLINE# with patch . dict ( pip . __salt__ , { #NEWLINE# #INDENT# 'cmd.run_all' : mock , #NEWLINE# #UNINDENT# } ) : #NEWLINE# #INDENT# pip . uninstall ( pkg , proxy = proxy ) #NEWLINE# mock . assert_called_once_with ( [ 'pip' , 'uninstall' , '-y' , '--proxy' , proxy , mock ] , saltenv = 'base' , cwd = None , runas = None , use_vt = False , python_shell = False )