aboutsummaryrefslogtreecommitdiffstats
path: root/tests/hazmat/primitives/test_dsa.py
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2017-11-10 23:19:05 -0500
committerPaul Kehrer <paul.l.kehrer@gmail.com>2017-11-11 12:19:05 +0800
commit270933c1a2afa0aa60409946bb7319d85fd60059 (patch)
treef5ff261a2dd5be46e812785d67f9322596b19792 /tests/hazmat/primitives/test_dsa.py
parentd2d800058f93f78e46afe504b5709b865b7af35d (diff)
downloadcryptography-270933c1a2afa0aa60409946bb7319d85fd60059.tar.gz
cryptography-270933c1a2afa0aa60409946bb7319d85fd60059.tar.bz2
cryptography-270933c1a2afa0aa60409946bb7319d85fd60059.zip
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
Diffstat (limited to 'tests/hazmat/primitives/test_dsa.py')
-rw-r--r--tests/hazmat/primitives/test_dsa.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/hazmat/primitives/test_dsa.py b/tests/hazmat/primitives/test_dsa.py
index 89303fed..f08de6a1 100644
--- a/tests/hazmat/primitives/test_dsa.py
+++ b/tests/hazmat/primitives/test_dsa.py
@@ -18,6 +18,7 @@ from cryptography.hazmat.primitives.asymmetric import dsa
from cryptography.hazmat.primitives.asymmetric.utils import (
Prehashed, encode_dss_signature
)
+from cryptography.utils import CryptographyDeprecationWarning
from .fixtures_dsa import (
DSA_KEY_1024, DSA_KEY_2048, DSA_KEY_3072
@@ -574,9 +575,8 @@ class TestDSAVerification(object):
y=vector['y']
).public_key(backend)
sig = encode_dss_signature(vector['r'], vector['s'])
- verifier = pytest.deprecated_call(
- public_key.verifier, sig, algorithm()
- )
+ with pytest.warns(CryptographyDeprecationWarning):
+ verifier = public_key.verifier(sig, algorithm())
verifier.update(vector['msg'])
if vector['result'] == "F":
@@ -687,7 +687,8 @@ class TestDSASignature(object):
),
x=vector['x']
).private_key(backend)
- signer = pytest.deprecated_call(private_key.signer, algorithm())
+ with pytest.warns(CryptographyDeprecationWarning):
+ signer = private_key.signer(algorithm())
signer.update(vector['msg'])
signature = signer.finalize()
assert signature