chantra / rpms / dnf

Forked from rpms/dnf 2 years ago
Clone

Blame SOURCES/0007-fix-tests.patch

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