From 270933c1a2afa0aa60409946bb7319d85fd60059 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Fri, 10 Nov 2017 23:19:05 -0500 Subject: Use a different warning class so users get warnings (#4014) * Use a different warning class so users get warnings * fixed tests * do our own warning class * typo * flake8 --- tests/hazmat/primitives/test_ec.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'tests/hazmat/primitives/test_ec.py') diff --git a/tests/hazmat/primitives/test_ec.py b/tests/hazmat/primitives/test_ec.py index f493869d..4f08f184 100644 --- a/tests/hazmat/primitives/test_ec.py +++ b/tests/hazmat/primitives/test_ec.py @@ -20,6 +20,7 @@ from cryptography.hazmat.primitives.asymmetric import ec from cryptography.hazmat.primitives.asymmetric.utils import ( Prehashed, encode_dss_signature ) +from cryptography.utils import CryptographyDeprecationWarning from .fixtures_ec import EC_KEY_SECP384R1 from ...doubles import DummyKeySerializationEncryption @@ -350,13 +351,13 @@ class TestECDSAVectors(object): pkey = key.public_key() assert pkey - signer = pytest.deprecated_call(key.signer, ec.ECDSA(hash_type())) + with pytest.warns(CryptographyDeprecationWarning): + signer = key.signer(ec.ECDSA(hash_type())) signer.update(b"YELLOW SUBMARINE") signature = signer.finalize() - verifier = pytest.deprecated_call( - pkey.verifier, signature, ec.ECDSA(hash_type()) - ) + with pytest.warns(CryptographyDeprecationWarning): + verifier = pkey.verifier(signature, ec.ECDSA(hash_type())) verifier.update(b"YELLOW SUBMARINE") verifier.verify() -- cgit v1.2.3