summaryrefslogtreecommitdiff
path: root/tests/unittests/test_handler/test_handler_apt_configure.py
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2015-01-22 20:30:10 -0500
committerBarry Warsaw <barry@python.org>2015-01-22 20:30:10 -0500
commitc0aae445119252134e8c89b3b73999ed213135f1 (patch)
treef4ca2238c25a97f242228c8d504c4af86f011046 /tests/unittests/test_handler/test_handler_apt_configure.py
parent8329ad5bad5d6b0fcb8f4736fb308914ca3600c7 (diff)
downloadvyos-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.py10
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")