예제 #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())