summaryrefslogtreecommitdiff
path: root/tests/unittests/test_util.py
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2015-01-22 18:38:30 -0500
committerBarry Warsaw <barry@python.org>2015-01-22 18:38:30 -0500
commit508670bdaf9545b6bcc8e2009e8bd3f08d6f8796 (patch)
tree613e6abbce7556f39ff2987bf7c4aa565b5a8a39 /tests/unittests/test_util.py
parentb3bbd3985a75d00115e1623dc1ebd4248a7024a6 (diff)
downloadvyos-cloud-init-508670bdaf9545b6bcc8e2009e8bd3f08d6f8796.tar.gz
vyos-cloud-init-508670bdaf9545b6bcc8e2009e8bd3f08d6f8796.zip
More test ports from mocker to mock.
Diffstat (limited to 'tests/unittests/test_util.py')
-rw-r--r--tests/unittests/test_util.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/unittests/test_util.py b/tests/unittests/test_util.py
index ee938969..5ac47b80 100644
--- a/tests/unittests/test_util.py
+++ b/tests/unittests/test_util.py
@@ -1,6 +1,8 @@
import os
import stat
import yaml
+import shutil
+import tempfile
from . import helpers
import unittest
@@ -63,7 +65,8 @@ class TestGetCfgOptionListOrStr(unittest.TestCase):
class TestWriteFile(unittest.TestCase):
def setUp(self):
super(TestWriteFile, self).setUp()
- self.tmp = self.makeDir(prefix="unittest_")
+ self.tmp = tempfile.mkdtemp()
+ self.addCleanup(shutil.rmtree, self.tmp)
def test_basic_usage(self):
"""Verify basic usage with default args."""