mirror of
https://github.com/ansible-collections/community.crypto.git
synced 2026-05-07 05:43:06 +00:00
Add isort and flake8 to CI (#869)
* Run isort. * Clean up unused assignments. * Add flake8 linting step.
This commit is contained in:
@@ -5,17 +5,19 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
from __future__ import absolute_import, division, print_function
|
||||
|
||||
|
||||
__metaclass__ = type
|
||||
|
||||
import pytest
|
||||
|
||||
from ansible_collections.community.crypto.plugins.module_utils.openssh.certificate import (
|
||||
OpensshCertificate,
|
||||
OpensshCertificateOption,
|
||||
OpensshCertificateTimeParameters,
|
||||
parse_option_list
|
||||
parse_option_list,
|
||||
)
|
||||
|
||||
|
||||
# Type: ssh-rsa-cert-v01@openssh.com user certificate
|
||||
# Public key: RSA-CERT SHA256:SvUwwUer4AwsdePYseJR3LcZS8lnKi6BqiL51Dop030
|
||||
# Signing CA: DSA SHA256:YCdJ2lYU+FSkWUud7zg1SJszprXoRGNU/GVcqXUjgC8
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
from __future__ import absolute_import, division, print_function
|
||||
__metaclass__ = type
|
||||
|
||||
import pytest
|
||||
|
||||
__metaclass__ = type
|
||||
|
||||
import os.path
|
||||
from getpass import getuser
|
||||
@@ -15,17 +15,19 @@ from os import remove, rmdir
|
||||
from socket import gethostname
|
||||
from tempfile import mkdtemp
|
||||
|
||||
import pytest
|
||||
from ansible_collections.community.crypto.plugins.module_utils.openssh.cryptography import (
|
||||
HAS_OPENSSH_SUPPORT,
|
||||
InvalidCommentError,
|
||||
InvalidPrivateKeyFileError,
|
||||
InvalidPublicKeyFileError,
|
||||
InvalidKeySizeError,
|
||||
InvalidKeyTypeError,
|
||||
InvalidPassphraseError,
|
||||
OpensshKeypair
|
||||
InvalidPrivateKeyFileError,
|
||||
InvalidPublicKeyFileError,
|
||||
OpensshKeypair,
|
||||
)
|
||||
|
||||
|
||||
DEFAULT_KEY_PARAMS = [
|
||||
(
|
||||
'rsa',
|
||||
|
||||
@@ -5,16 +5,18 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
from __future__ import absolute_import, division, print_function
|
||||
|
||||
|
||||
__metaclass__ = type
|
||||
|
||||
import pytest
|
||||
|
||||
from ansible_collections.community.crypto.plugins.module_utils.openssh.utils import (
|
||||
parse_openssh_version,
|
||||
OpensshParser,
|
||||
_OpensshWriter
|
||||
_OpensshWriter,
|
||||
parse_openssh_version,
|
||||
)
|
||||
|
||||
|
||||
SSH_VERSION_STRING = "OpenSSH_7.9p1, OpenSSL 1.1.0i-fips 14 Aug 2018"
|
||||
SSH_VERSION_NUMBER = "7.9"
|
||||
|
||||
@@ -135,7 +137,6 @@ def test_valid_seek():
|
||||
|
||||
|
||||
def test_invalid_seek():
|
||||
result = False
|
||||
buffer = b'buffer'
|
||||
parser = OpensshParser(buffer)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user