コード例 #1
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"), [])
コード例 #2
0
ファイル: locate_test.py プロジェクト: DaveQB/salt
 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'), [])
コード例 #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'), [])