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"), [])
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'), [])