diff options
author | Barry Warsaw <barry@python.org> | 2015-01-22 20:30:10 -0500 |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 2015-01-22 20:30:10 -0500 |
commit | c0aae445119252134e8c89b3b73999ed213135f1 (patch) | |
tree | f4ca2238c25a97f242228c8d504c4af86f011046 /tests/unittests/test_handler/test_handler_apt_configure.py | |
parent | 8329ad5bad5d6b0fcb8f4736fb308914ca3600c7 (diff) | |
download | vyos-cloud-init-c0aae445119252134e8c89b3b73999ed213135f1.tar.gz vyos-cloud-init-c0aae445119252134e8c89b3b73999ed213135f1.zip |
More conversions from mocker to mock.
Diffstat (limited to 'tests/unittests/test_handler/test_handler_apt_configure.py')
-rw-r--r-- | tests/unittests/test_handler/test_handler_apt_configure.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/unittests/test_handler/test_handler_apt_configure.py b/tests/unittests/test_handler/test_handler_apt_configure.py index f5832365..2c3dad72 100644 --- a/tests/unittests/test_handler/test_handler_apt_configure.py +++ b/tests/unittests/test_handler/test_handler_apt_configure.py @@ -1,17 +1,19 @@ -from mocker import MockerTestCase - from cloudinit import util from cloudinit.config import cc_apt_configure import os import re +import shutil +import tempfile +import unittest -class TestAptProxyConfig(MockerTestCase): +class TestAptProxyConfig(unittest.TestCase): def setUp(self): super(TestAptProxyConfig, self).setUp() - self.tmp = self.makeDir() + self.tmp = tempfile.mkdtemp() + self.addCleanup(shutil.rmtree, self.tmp) self.pfile = os.path.join(self.tmp, "proxy.cfg") self.cfile = os.path.join(self.tmp, "config.cfg") |