Re-enable tests that work with newer pytest Patch out python3-mock Manually build manpages to workaround upstream issue. Remove unneeded BRs Make ansible-base* Obsoletes/Provides compliant with Packaging Guidelines Remove python3-jmespath dependency. json_query is part of community.general.
29 lines
1.0 KiB
Diff
29 lines
1.0 KiB
Diff
From a555134e06d56396c9effa73d7d201ef3de945d4 Mon Sep 17 00:00:00 2001
|
|
From: Matt Clay <matt@mystile.com>
|
|
Date: Tue, 17 May 2022 22:54:53 -0700
|
|
Subject: [PATCH] [stable-2.13] Avoid deprecated method in unit tests. (cherry
|
|
picked from commit 5f74350fd5fab5599127eaa43c615d2159e145c6)
|
|
|
|
Co-authored-by: Matt Clay <matt@mystile.com>
|
|
---
|
|
test/units/ansible_test/ci/util.py | 6 ++----
|
|
1 file changed, 2 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/test/units/ansible_test/ci/util.py b/test/units/ansible_test/ci/util.py
|
|
index ba8e358bc8f30f..2273f0ab6b0c3c 100644
|
|
--- a/test/units/ansible_test/ci/util.py
|
|
+++ b/test/units/ansible_test/ci/util.py
|
|
@@ -44,10 +44,8 @@ def verify_signature(request, public_key_pem):
|
|
|
|
public_key = load_pem_public_key(public_key_pem.encode(), default_backend())
|
|
|
|
- verifier = public_key.verifier(
|
|
+ public_key.verify(
|
|
base64.b64decode(signature.encode()),
|
|
+ payload_bytes,
|
|
ec.ECDSA(hashes.SHA256()),
|
|
)
|
|
-
|
|
- verifier.update(payload_bytes)
|
|
- verifier.verify()
|