示例#1
0
 def test_clear(self):
     """
     Test if it clear out all of the data in the minion datastore
     """
     with patch("os.remove", MagicMock(return_value="")):
         with patch.dict(data.__opts__, {"cachedir": ""}):
             self.assertTrue(data.clear())
示例#2
0
 def test_clear(self):
     '''
     Test if it clear out all of the data in the minion datastore
     '''
     with patch('os.remove', MagicMock(return_value='')):
         with patch.dict(data.__opts__, {'cachedir': ''}):
             self.assertTrue(data.clear())
示例#3
0
文件: data_test.py 项目: bryson/salt
 def test_clear(self):
     '''
     Test if it clear out all of the data in the minion datastore
     '''
     mock = MagicMock(return_value='')
     with patch.dict(data.__opts__, {'cachedir': mock}):
         self.assertTrue(data.clear())