summaryrefslogtreecommitdiff
path: root/tests/unittests/test_render_cloudcfg.py
diff options
context:
space:
mode:
authorDaniel Watkins <oddbloke@ubuntu.com>2020-07-02 13:51:28 -0400
committerGitHub <noreply@github.com>2020-07-02 11:51:28 -0600
commit2b727914e8cbee6810b1bb9a1cfdb90ad521ceb6 (patch)
tree41c2b91e3509da06cf6ed2c536b7e0032609209d /tests/unittests/test_render_cloudcfg.py
parente31f7fe43aa8f352097c4bb3e97fc3acca8a26b7 (diff)
downloadvyos-cloud-init-2b727914e8cbee6810b1bb9a1cfdb90ad521ceb6.tar.gz
vyos-cloud-init-2b727914e8cbee6810b1bb9a1cfdb90ad521ceb6.zip
tests: use markers to configure disable_subp_usage (#473)
This is an improvement over indirect parameterisation for a few reasons: * The test code is much easier to read, the mark names are much more intuitive than the indirect parameterisation invocation, and there's less boilerplate to boot * The fixture no longer has to overload the single parameter that fixtures can take with multiple meanings
Diffstat (limited to 'tests/unittests/test_render_cloudcfg.py')
-rw-r--r--tests/unittests/test_render_cloudcfg.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/unittests/test_render_cloudcfg.py b/tests/unittests/test_render_cloudcfg.py
index 696915a3..495e2669 100644
--- a/tests/unittests/test_render_cloudcfg.py
+++ b/tests/unittests/test_render_cloudcfg.py
@@ -13,7 +13,7 @@ DISTRO_VARIANTS = ["amazon", "arch", "centos", "debian", "fedora", "freebsd",
"netbsd", "openbsd", "rhel", "suse", "ubuntu", "unknown"]
-@pytest.mark.parametrize('disable_subp_usage', [sys.executable], indirect=True)
+@pytest.mark.allow_subp_for(sys.executable)
class TestRenderCloudCfg:
cmd = [sys.executable, os.path.realpath('tools/render-cloudcfg')]