summaryrefslogtreecommitdiff
path: root/tests/unittests/test_util.py
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@yahoo-inc.com>2012-06-21 15:59:57 -0700
committerJoshua Harlow <harlowja@yahoo-inc.com>2012-06-21 15:59:57 -0700
commit51181b8540372b9b83bbab51cae548992c497682 (patch)
tree80a5a31add83e1c052963679d426d24d732f1bef /tests/unittests/test_util.py
parent0f1c493aa032b60210fc63c6b120b833ba4c10de (diff)
downloadvyos-cloud-init-51181b8540372b9b83bbab51cae548992c497682.tar.gz
vyos-cloud-init-51181b8540372b9b83bbab51cae548992c497682.zip
Missed some other mkdtemp and rmtree calls no longer needed
Diffstat (limited to 'tests/unittests/test_util.py')
-rw-r--r--tests/unittests/test_util.py14
1 files changed, 2 insertions, 12 deletions
diff --git a/tests/unittests/test_util.py b/tests/unittests/test_util.py
index aea1aabb..ba565b29 100644
--- a/tests/unittests/test_util.py
+++ b/tests/unittests/test_util.py
@@ -101,12 +101,8 @@ class TestGetCfgOptionListOrStr(TestCase):
class TestWriteFile(MockerTestCase):
def setUp(self):
super(TestWriteFile, self).setUp()
- # Make a temp directoy for tests to use.
self.tmp = self.makeDir(prefix="unittest_")
- def tearDown(self):
- super(TestWriteFile, self).tearDown()
-
def test_basic_usage(self):
"""Verify basic usage with default args."""
path = os.path.join(self.tmp, "NewFile.txt")
@@ -182,16 +178,10 @@ class TestWriteFile(MockerTestCase):
pass
-class TestDeleteDirContents(TestCase):
+class TestDeleteDirContents(MockerTestCase):
def setUp(self):
super(TestDeleteDirContents, self).setUp()
- # Make a temp directoy for tests to use.
- self.tmp = mkdtemp(prefix="unittest_")
-
- def tearDown(self):
- super(TestDeleteDirContents, self).tearDown()
- # Clean up temp directory
- rmtree(self.tmp)
+ self.tmp = self.makeDir(prefix="unittest_")
def assertDirEmpty(self, dirname):
self.assertEqual([], os.listdir(dirname))