#NEWLINE# def test_install_multiple_editable( self ) : #NEWLINE# #INDENT# editables = [ 'git+https://github.com/jek/blinker.git#egg=Blinker' , 'git+https://github.com/saltstack/salt-testing.git#egg=SaltTesting' ] #NEWLINE# expected = [ 'pip' , 'install' ] #NEWLINE# for item in editables : #NEWLINE# #INDENT# expected . extend ( [ '--editable' , item ] ) #NEWLINE# #UNINDENT# 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 . install ( editable = editables ) #NEWLINE# mock . assert_called_once_with ( expected , saltenv = 'base' , runas = None , use_vt = False , python_shell = False ) #NEWLINE# #UNINDENT# 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 . install ( editable = ',' . join ( editables ) ) #NEWLINE# mock . assert_called_once_with ( expected , saltenv = 'base' , runas = None , use_vt = False , python_shell = False )