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_distros | |
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_distros')
-rw-r--r-- | tests/unittests/test_distros/test_generic.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/unittests/test_distros/test_generic.py b/tests/unittests/test_distros/test_generic.py index db6aa0e8..2c85cbdb 100644 --- a/tests/unittests/test_distros/test_generic.py +++ b/tests/unittests/test_distros/test_generic.py @@ -4,6 +4,8 @@ from cloudinit import util from .. import helpers import os +import shutil +import tempfile unknown_arch_info = { 'arches': ['default'], @@ -53,7 +55,8 @@ class TestGenericDistro(helpers.FilesystemMockingTestCase): def setUp(self): super(TestGenericDistro, self).setUp() # Make a temp directoy for tests to use. - self.tmp = self.makeDir() + self.tmp = tempfile.mkdtemp() + self.addCleanup(shutil.rmtree, self.tmp) def _write_load_sudoers(self, _user, rules): cls = distros.fetch("ubuntu") |