diff options
author | Scott Moser <smoser@ubuntu.com> | 2017-07-12 17:16:35 -0700 |
---|---|---|
committer | Scott Moser <smoser@brickies.net> | 2017-07-19 07:53:10 -0400 |
commit | 865e941f3f88c7daeafbf1eab856e02ce2b6a5f7 (patch) | |
tree | 99342a0c9f32295e5315705f3d36a356bf247aea /tests/unittests/test_runs | |
parent | d1e8eb73aca6a3f5cee415774dcf540e934ec250 (diff) | |
download | vyos-cloud-init-865e941f3f88c7daeafbf1eab856e02ce2b6a5f7.tar.gz vyos-cloud-init-865e941f3f88c7daeafbf1eab856e02ce2b6a5f7.zip |
tests: fixes for issues uncovered when moving to python 3.6.
This includes a few fixes found when testing with python 3.6.
- fix eni renderer when target is None
This just uses the util.target_path() in the event that target is None.
- change test cases to not rely on the cached result of
util.get_cmdline() and other cached globals. Update the base TestCase
to unset that cache.
- mock calls to system_is_snappy from the create_users test cases.
- drop unused _pp_root in test_simple_run.py
LP: #1703697
Diffstat (limited to 'tests/unittests/test_runs')
-rw-r--r-- | tests/unittests/test_runs/test_simple_run.py | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/tests/unittests/test_runs/test_simple_run.py b/tests/unittests/test_runs/test_simple_run.py index 31324204..55f15b55 100644 --- a/tests/unittests/test_runs/test_simple_run.py +++ b/tests/unittests/test_runs/test_simple_run.py @@ -16,24 +16,6 @@ class TestSimpleRun(helpers.FilesystemMockingTestCase): self.patchOS(root) self.patchUtils(root) - def _pp_root(self, root, repatch=True): - for (dirpath, dirnames, filenames) in os.walk(root): - print(dirpath) - for f in filenames: - joined = os.path.join(dirpath, f) - if os.path.islink(joined): - print("f %s - (symlink)" % (f)) - else: - print("f %s" % (f)) - for d in dirnames: - joined = os.path.join(dirpath, d) - if os.path.islink(joined): - print("d %s - (symlink)" % (d)) - else: - print("d %s" % (d)) - if repatch: - self._patchIn(root) - def test_none_ds(self): new_root = tempfile.mkdtemp() self.addCleanup(shutil.rmtree, new_root) |