diff options
Diffstat (limited to 'tests/unittests/test_handler/test_handler_yum_add_repo.py')
-rw-r--r-- | tests/unittests/test_handler/test_handler_yum_add_repo.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/unittests/test_handler/test_handler_yum_add_repo.py b/tests/unittests/test_handler/test_handler_yum_add_repo.py index 81806ad1..3a8aa7c1 100644 --- a/tests/unittests/test_handler/test_handler_yum_add_repo.py +++ b/tests/unittests/test_handler/test_handler_yum_add_repo.py @@ -4,6 +4,8 @@ from cloudinit.config import cc_yum_add_repo from .. import helpers +import shutil +import tempfile import logging from six import BytesIO @@ -16,7 +18,8 @@ LOG = logging.getLogger(__name__) class TestConfig(helpers.FilesystemMockingTestCase): def setUp(self): super(TestConfig, self).setUp() - self.tmp = self.makeDir(prefix="unittest_") + self.tmp = tempfile.mkdtemp() + self.addCleanup(shutil.rmtree, self.tmp) def test_bad_config(self): cfg = { |