summaryrefslogtreecommitdiff
path: root/tests/unittests/test_atomic_helper.py
diff options
context:
space:
mode:
authorScott Moser <smoser@brickies.net>2017-01-19 17:31:34 -0500
committerScott Moser <smoser@brickies.net>2017-01-24 16:32:30 -0500
commit65e01b463cee0bdb8c8b415e78abfcc3262aad89 (patch)
treedc0b0a5c0cfddda0723e62a214469ab5d8eb42eb /tests/unittests/test_atomic_helper.py
parent8e9e47f2f06b4dcf017149699111e94ba7c1830b (diff)
downloadvyos-cloud-init-65e01b463cee0bdb8c8b415e78abfcc3262aad89.tar.gz
vyos-cloud-init-65e01b463cee0bdb8c8b415e78abfcc3262aad89.zip
tests: remove executable bit on test_net, so it runs, and fix it.
The test_user_data_normalize and test_net files had gotten the executable bit set, and thus are skipped by nose by default. We could set run with the --exe flag, but they should not have gotten this way. Other changes here: * replace TempDirTestCase with CiTestCase, which has some nice tmp_dir() and tmp_path() functions. Going forward the intent is to have CiTestCase be the base test case for tests. * test_net: switch to CiTestCase and fix usage that was silently broken, because of exe bit. * populate_dir: return the list of files that it writes rather than having no return value. * CiTestCase: * support tmp_path("foo") that returns a full path to 'foo' under a tmpdir. * add tmp_dir() to get a temp dir and clean up.
Diffstat (limited to 'tests/unittests/test_atomic_helper.py')
-rw-r--r--tests/unittests/test_atomic_helper.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/unittests/test_atomic_helper.py b/tests/unittests/test_atomic_helper.py
index e170c7c3..515919d8 100644
--- a/tests/unittests/test_atomic_helper.py
+++ b/tests/unittests/test_atomic_helper.py
@@ -6,10 +6,10 @@ import stat
from cloudinit import atomic_helper
-from . import helpers
+from .helpers import CiTestCase
-class TestAtomicHelper(helpers.TempDirTestCase):
+class TestAtomicHelper(CiTestCase):
def test_basic_usage(self):
"""write_file takes bytes if no omode."""
path = self.tmp_path("test_basic_usage")