Exemplo n.º 1
0
 def test_list_packages_success(self):
     '''
     Test if it lists installed Bower packages
     '''
     output = '{"dependencies": {"underscore": {}, "jquery":{}}}'
     mock = MagicMock(return_value={'retcode': 0, 'stdout': output})
     with patch.dict(bower.__salt__, {'cmd.run_all': mock}):
         self.assertEqual(bower.list_('/path/to/project'),
                          {'underscore': {}, 'jquery': {}})
Exemplo n.º 2
0
 def test_list_packages_success(self):
     '''
     Test if it lists installed Bower packages
     '''
     output = '{"dependencies": {"underscore": {}, "jquery":{}}}'
     mock = MagicMock(return_value={'retcode': 0, 'stdout': output})
     with patch.dict(bower.__salt__, {'cmd.run_all': mock}):
         self.assertEqual(bower.list_('/path/to/project'),
                          {'underscore': {}, 'jquery': {}})
Exemplo n.º 3
0
 def test_list_packages_success(self):
     """
     Test if it lists installed Bower packages
     """
     output = '{"dependencies": {"underscore": {}, "jquery":{}}}'
     mock = MagicMock(return_value={"retcode": 0, "stdout": output})
     with patch.dict(bower.__salt__, {"cmd.run_all": mock}):
         self.assertEqual(bower.list_("/path/to/project"), {
             "underscore": {},
             "jquery": {}
         })