Exemple #1
0
 def test_list(self):
     '''
     Test if it list installed Perl module
     '''
     mock = MagicMock(return_value='')
     with patch.dict(cpan.__salt__, {'cmd.run': mock}):
         self.assertDictEqual(cpan.list_(), {})
Exemple #2
0
 def test_list(self):
     '''
     Test if it list installed Perl module
     '''
     mock = MagicMock(return_value='')
     with patch.dict(cpan.__salt__, {'cmd.run': mock}):
         self.assertDictEqual(cpan.list_(), {})
Exemple #3
0
 def test_list(self):
     """
     Test if it list installed Perl module
     """
     mock = MagicMock(return_value="")
     with patch.dict(cpan.__salt__, {"cmd.run": mock}):
         self.assertDictEqual(cpan.list_(), {})
Exemple #4
0
 def test_list(self):
     '''
     Test if it list installed Perl module
     '''
     mock = MagicMock(return_value={})
     with patch.object(salt.utils.path, 'which', MagicMock(return_value='/usr/bin/cpan')):
         with patch.dict(cpan.__salt__, {'cmd.run_all': mock}):
             self.assertDictEqual(cpan.list_(), {})