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())
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())
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())