diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2017-11-10 23:19:05 -0500 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2017-11-11 12:19:05 +0800 |
commit | 270933c1a2afa0aa60409946bb7319d85fd60059 (patch) | |
tree | f5ff261a2dd5be46e812785d67f9322596b19792 /tests/hazmat/primitives/test_asym_utils.py | |
parent | d2d800058f93f78e46afe504b5709b865b7af35d (diff) | |
download | cryptography-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_asym_utils.py')
-rw-r--r-- | tests/hazmat/primitives/test_asym_utils.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/hazmat/primitives/test_asym_utils.py b/tests/hazmat/primitives/test_asym_utils.py index 4835f091..fc9e9fd8 100644 --- a/tests/hazmat/primitives/test_asym_utils.py +++ b/tests/hazmat/primitives/test_asym_utils.py @@ -10,12 +10,15 @@ from cryptography.hazmat.primitives.asymmetric.utils import ( Prehashed, decode_dss_signature, decode_rfc6979_signature, encode_dss_signature, encode_rfc6979_signature, ) +from cryptography.utils import CryptographyDeprecationWarning def test_deprecated_rfc6979_signature(): - sig = pytest.deprecated_call(encode_rfc6979_signature, 1, 1) + with pytest.warns(CryptographyDeprecationWarning): + sig = encode_rfc6979_signature(1, 1) assert sig == b"0\x06\x02\x01\x01\x02\x01\x01" - decoded = pytest.deprecated_call(decode_rfc6979_signature, sig) + with pytest.warns(CryptographyDeprecationWarning): + decoded = decode_rfc6979_signature(sig) assert decoded == (1, 1) |