Blob Blame History Raw
diff --git a/tests/test_history_undo.py b/tests/test_history_undo.py
index 5c7e423c..a551336b 100644
--- a/tests/test_history_undo.py
+++ b/tests/test_history_undo.py
@@ -30,6 +30,7 @@ from dnf.transaction import (ERASE, DOWNGRADE, INSTALL, REINSTALL,
 from hawkey import split_nevra
 from tests.support import mock_sack, Base, ObjectMatcher
 from unittest import TestCase
+import tempfile
 
 class BaseTest(TestCase):
     """Unit tests of dnf.Base."""
@@ -60,6 +61,7 @@ class BaseTest(TestCase):
     def setUp(self):
         """Prepare the test fixture."""
         self._base = Base()
+        self._base.conf.persistdir = tempfile.mkdtemp()
         self._base._sack = mock_sack('main', 'updates')
 
     def test_history_undo_operations_downgrade(self):
@@ -113,6 +115,7 @@ class BaseTest(TestCase):
     def test_history_undo_operations_erase_twoavailable(self):
         """Test history_undo_operations with an erase available in two repos."""
         base = Base()
+        base.conf.persistdir = tempfile.mkdtemp()
         base._sack = mock_sack('main', 'search')
         operations = NEVRAOperations()
         operations.add('Erase', 'lotus-3-16.x86_64')