def test_locate(self):
     """
     Test if it performs a file lookup.
     """
     mock = MagicMock(return_value="")
     with patch.dict(locate.__salt__, {"cmd.run": mock}):
         self.assertListEqual(locate.locate("wholename", database="myfile"), [])
Exemple #2
0
 def test_locate(self):
     '''
     Test if it performs a file lookup.
     '''
     mock = MagicMock(return_value='')
     with patch.dict(locate.__salt__, {'cmd.run': mock}):
         self.assertListEqual(locate.locate('wholename', database='myfile'), [])
Exemple #3
0
 def test_locate(self):
     '''
     Test if it performs a file lookup.
     '''
     mock = MagicMock(return_value='')
     with patch.dict(locate.__salt__, {'cmd.run': mock}):
         self.assertListEqual(locate.locate('wholename', database='myfile'), [])