Blame SOURCES/0007-fix-tests.patch

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