#NEWLINE# @ patch ( 'salt.modules.bower._check_valid_version' , MagicMock ( return_value = True ) ) #NEWLINE# def test_uninstall_existing_package( self ) : #NEWLINE# #INDENT# '\n        Test if it returns True when uninstall package succeeds\n        ' #NEWLINE# mock = MagicMock ( return_value = { #NEWLINE# #INDENT# 'retcode' : 0 , #NEWLINE# 'stdout' : '{"underscore": {}}' , #NEWLINE# #UNINDENT# } ) #NEWLINE# with patch . dict ( bower . __salt__ , { #NEWLINE# #INDENT# 'cmd.run_all' : self , #NEWLINE# #UNINDENT# } ) : #NEWLINE# #INDENT# self . assertTrue ( bower . uninstall ( '/path/to/project' , 'underscore' ) )