mirror of
https://github.com/ansible-collections/community.crypto.git
synced 2026-05-07 05:43:06 +00:00
Code refactoring (#889)
* Add __all__ to all module and plugin utils. * Convert quite a few positional args to keyword args. * Avoid Python 3.8+ syntax.
This commit is contained in:
@@ -103,7 +103,8 @@ def test_nopad_b64(value: str, result: str) -> None:
|
||||
def test_pem_to_der(pem: str, der: bytes, tmpdir):
|
||||
fn = tmpdir / "test.pem"
|
||||
fn.write(pem)
|
||||
assert pem_to_der(str(fn)) == der
|
||||
assert pem_to_der(pem_filename=str(fn)) == der
|
||||
assert pem_to_der(pem_content=pem) == der
|
||||
|
||||
|
||||
@pytest.mark.parametrize("value, expected_result", TEST_LINKS_HEADER)
|
||||
@@ -115,7 +116,7 @@ def test_process_links(
|
||||
def callback(url, rel):
|
||||
data.append((url, rel))
|
||||
|
||||
process_links(value, callback)
|
||||
process_links(info=value, callback=callback)
|
||||
|
||||
assert expected_result == data
|
||||
|
||||
|
||||
Reference in New Issue
Block a user