summaryrefslogtreecommitdiff
path: root/tests/unittests/test_handler/test_handler_chef.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_handler/test_handler_chef.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_handler/test_handler_chef.py')
-rw-r--r--tests/unittests/test_handler/test_handler_chef.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/unittests/test_handler/test_handler_chef.py b/tests/unittests/test_handler/test_handler_chef.py
index ef1aa208..b06a160c 100644
--- a/tests/unittests/test_handler/test_handler_chef.py
+++ b/tests/unittests/test_handler/test_handler_chef.py
@@ -12,6 +12,8 @@ from cloudinit.sources import DataSourceNone
from .. import helpers as t_help
import logging
+import shutil
+import tempfile
LOG = logging.getLogger(__name__)
@@ -19,7 +21,8 @@ LOG = logging.getLogger(__name__)
class TestChef(t_help.FilesystemMockingTestCase):
def setUp(self):
super(TestChef, self).setUp()
- self.tmp = self.makeDir(prefix="unittest_")
+ self.tmp = tempfile.mkdtemp()
+ self.addCleanup(shutil.rmtree, self.tmp)
def fetch_cloud(self, distro_kind):
cls = distros.fetch(distro_kind)