diff options
Diffstat (limited to 'tests/test_algorithms.py')
-rw-r--r-- | tests/test_algorithms.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/test_algorithms.py b/tests/test_algorithms.py index f4ab75b..fca930c 100644 --- a/tests/test_algorithms.py +++ b/tests/test_algorithms.py @@ -226,16 +226,14 @@ class TestAlgorithms: for curve in ("P-256", "P-384", "P-521", "secp256k1"): with pytest.raises(InvalidKeyError): algo.from_jwk( - '{{"kty": "EC", "crv": "{}", "x": "dGVzdA==", ' - '"y": "dGVzdA=="}}'.format(curve) + f'{{"kty": "EC", "crv": "{curve}", "x": "dGVzdA==", "y": "dGVzdA=="}}' ) # EC private key length invalid for (curve, point) in valid_points.items(): with pytest.raises(InvalidKeyError): algo.from_jwk( - '{{"kty": "EC", "crv": "{}", "x": "{}", "y": "{}", ' - '"d": "dGVzdA=="}}'.format(curve, point["x"], point["y"]) + f'{{"kty": "EC", "crv": "{curve}", "x": "{point["x"]}", "y": "{point["y"]}", "d": "dGVzdA=="}}' ) @crypto_required |