mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-08-01 04:14:42 +00:00
tests/utils.py: Fix pylint issues.
This commit is contained in:
@@ -43,7 +43,6 @@ tests/sanity/sanity.sh shebang!skip
|
|||||||
tests/user/users.sh shebang!skip
|
tests/user/users.sh shebang!skip
|
||||||
tests/user/users_absent.sh shebang!skip
|
tests/user/users_absent.sh shebang!skip
|
||||||
tests/utils.py pylint:ansible-format-automatic-specification
|
tests/utils.py pylint:ansible-format-automatic-specification
|
||||||
tests/utils.py pylint:subprocess-run-check
|
|
||||||
utils/ansible-doc-test shebang!skip
|
utils/ansible-doc-test shebang!skip
|
||||||
utils/ansible-ipa-client-install shebang!skip
|
utils/ansible-ipa-client-install shebang!skip
|
||||||
utils/ansible-ipa-replica-install shebang!skip
|
utils/ansible-ipa-replica-install shebang!skip
|
||||||
|
|||||||
@@ -174,6 +174,7 @@ def _run_playbook(playbook):
|
|||||||
inventory_file.name,
|
inventory_file.name,
|
||||||
playbook,
|
playbook,
|
||||||
]
|
]
|
||||||
|
# pylint: disable=subprocess-run-check
|
||||||
process = subprocess.run(
|
process = subprocess.run(
|
||||||
cmd, cwd=SCRIPT_DIR, stdout=subprocess.PIPE, stderr=subprocess.PIPE
|
cmd, cwd=SCRIPT_DIR, stdout=subprocess.PIPE, stderr=subprocess.PIPE
|
||||||
)
|
)
|
||||||
@@ -300,11 +301,13 @@ class AnsibleFreeIPATestCase(TestCase):
|
|||||||
host_connection_info, ssh_identity_file=ssh_identity_file,
|
host_connection_info, ssh_identity_file=ssh_identity_file,
|
||||||
)
|
)
|
||||||
|
|
||||||
def run_playbook(self, playbook, allow_failures=False):
|
@staticmethod
|
||||||
|
def run_playbook(playbook, allow_failures=False):
|
||||||
return run_playbook(playbook, allow_failures)
|
return run_playbook(playbook, allow_failures)
|
||||||
|
|
||||||
def run_playbook_with_exp_msg(self, playbook, expected_msg):
|
@staticmethod
|
||||||
result = self.run_playbook(playbook, allow_failures=True)
|
def run_playbook_with_exp_msg(playbook, expected_msg):
|
||||||
|
result = run_playbook(playbook, allow_failures=True)
|
||||||
assert (
|
assert (
|
||||||
expected_msg in result.stdout.decode("utf8")
|
expected_msg in result.stdout.decode("utf8")
|
||||||
or
|
or
|
||||||
|
|||||||
Reference in New Issue
Block a user