diff options
author | Barry Warsaw <barry@python.org> | 2015-01-22 18:38:30 -0500 |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 2015-01-22 18:38:30 -0500 |
commit | 508670bdaf9545b6bcc8e2009e8bd3f08d6f8796 (patch) | |
tree | 613e6abbce7556f39ff2987bf7c4aa565b5a8a39 /tests/unittests/test_handler/test_handler_timezone.py | |
parent | b3bbd3985a75d00115e1623dc1ebd4248a7024a6 (diff) | |
download | vyos-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_timezone.py')
-rw-r--r-- | tests/unittests/test_handler/test_handler_timezone.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/unittests/test_handler/test_handler_timezone.py b/tests/unittests/test_handler/test_handler_timezone.py index 10ea2040..e3df8759 100644 --- a/tests/unittests/test_handler/test_handler_timezone.py +++ b/tests/unittests/test_handler/test_handler_timezone.py @@ -31,6 +31,8 @@ from configobj import ConfigObj from six import BytesIO +import shutil +import tempfile import logging LOG = logging.getLogger(__name__) @@ -39,7 +41,8 @@ LOG = logging.getLogger(__name__) class TestTimezone(t_help.FilesystemMockingTestCase): def setUp(self): super(TestTimezone, self).setUp() - self.new_root = self.makeDir(prefix="unittest_") + self.new_root = tempfile.mkdtemp() + self.addCleanup(shutil.rmtree, self.new_root) def _get_cloud(self, distro): self.patchUtils(self.new_root) |