summaryrefslogtreecommitdiff
path: root/tests/unittests/test_conftest.py
diff options
context:
space:
mode:
authorJames Falcon <james.falcon@canonical.com>2021-12-15 20:16:38 -0600
committerGitHub <noreply@github.com>2021-12-15 19:16:38 -0700
commitbae9b11da9ed7dd0b16fe5adeaf4774b7cc628cf (patch)
tree1fbb3269fc87e39832e3286ef42eefd2b23fcd44 /tests/unittests/test_conftest.py
parent2bcf4fa972fde686c2e3141c58e640640b44dd00 (diff)
downloadvyos-cloud-init-bae9b11da9ed7dd0b16fe5adeaf4774b7cc628cf.tar.gz
vyos-cloud-init-bae9b11da9ed7dd0b16fe5adeaf4774b7cc628cf.zip
Adopt Black and isort (SC-700) (#1157)
Applied Black and isort, fixed any linting issues, updated tox.ini and CI.
Diffstat (limited to 'tests/unittests/test_conftest.py')
-rw-r--r--tests/unittests/test_conftest.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/unittests/test_conftest.py b/tests/unittests/test_conftest.py
index 2e02b7a7..68903430 100644
--- a/tests/unittests/test_conftest.py
+++ b/tests/unittests/test_conftest.py
@@ -19,7 +19,7 @@ class TestDisableSubpUsage:
@pytest.mark.allow_all_subp
def test_subp_usage_can_be_reenabled(self):
- subp.subp(['whoami'])
+ subp.subp(["whoami"])
@pytest.mark.allow_subp_for("whoami")
def test_subp_usage_can_be_conditionally_reenabled(self):
@@ -28,15 +28,15 @@ class TestDisableSubpUsage:
with pytest.raises(AssertionError) as excinfo:
subp.subp(["some", "args"])
assert "allowed: whoami" in str(excinfo.value)
- subp.subp(['whoami'])
+ subp.subp(["whoami"])
@pytest.mark.allow_subp_for("whoami", "bash")
def test_subp_usage_can_be_conditionally_reenabled_for_multiple_cmds(self):
with pytest.raises(AssertionError) as excinfo:
subp.subp(["some", "args"])
assert "allowed: whoami,bash" in str(excinfo.value)
- subp.subp(['bash', '-c', 'true'])
- subp.subp(['whoami'])
+ subp.subp(["bash", "-c", "true"])
+ subp.subp(["whoami"])
@pytest.mark.allow_all_subp
@pytest.mark.allow_subp_for("bash")
@@ -60,6 +60,6 @@ class TestDisableSubpUsageInTestSubclass(CiTestCase):
_old_allowed_subp = self.allow_subp
self.allowed_subp = True
try:
- subp.subp(['bash', '-c', 'true'])
+ subp.subp(["bash", "-c", "true"])
finally:
self.allowed_subp = _old_allowed_subp