summaryrefslogtreecommitdiff
path: root/tests/cloud_tests/util.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/cloud_tests/util.py')
-rw-r--r--tests/cloud_tests/util.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/cloud_tests/util.py b/tests/cloud_tests/util.py
index 6ff285e7..3dd4996d 100644
--- a/tests/cloud_tests/util.py
+++ b/tests/cloud_tests/util.py
@@ -460,6 +460,10 @@ class PlatformError(IOError):
IOError.__init__(self, message)
+def mkdtemp(prefix='cloud_test_data'):
+ return tempfile.mkdtemp(prefix=prefix)
+
+
class TempDir(object):
"""Configurable temporary directory like tempfile.TemporaryDirectory."""
@@ -480,7 +484,7 @@ class TempDir(object):
@return_value: tempdir path
"""
if not self.tmpdir:
- self.tmpdir = tempfile.mkdtemp(prefix=self.prefix)
+ self.tmpdir = mkdtemp(prefix=self.prefix)
LOG.debug('using tmpdir: %s', self.tmpdir)
return self.tmpdir