diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2019-11-03 01:47:13 -0400 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2019-11-03 13:47:13 +0800 |
commit | 9668b000326585339267a42176facd9ff81481ee (patch) | |
tree | d9b57ace202f397461f9cb8aca436a24a68f699a /tests/hazmat | |
parent | 6d450f7fdc6be790443d82aa5aff8572ba3965bf (diff) | |
download | cryptography-9668b000326585339267a42176facd9ff81481ee.tar.gz cryptography-9668b000326585339267a42176facd9ff81481ee.tar.bz2 cryptography-9668b000326585339267a42176facd9ff81481ee.zip |
Deal with the 2.5 deprecations (#5048)
* Deal with the 2.5 deprecations
* pep8 + test fixes
* docs typo
* Why did I do this?
* typo
Diffstat (limited to 'tests/hazmat')
-rw-r--r-- | tests/hazmat/primitives/test_ec.py | 2 | ||||
-rw-r--r-- | tests/hazmat/primitives/test_x25519.py | 8 |
2 files changed, 2 insertions, 8 deletions
diff --git a/tests/hazmat/primitives/test_ec.py b/tests/hazmat/primitives/test_ec.py index 922a25f0..987c0ff0 100644 --- a/tests/hazmat/primitives/test_ec.py +++ b/tests/hazmat/primitives/test_ec.py @@ -181,7 +181,7 @@ def test_encode_point(): 16 ) pn = ec.EllipticCurvePublicNumbers(x, y, ec.SECP256R1()) - with pytest.warns(utils.DeprecatedIn25): + with pytest.warns(utils.PersistentlyDeprecated2019): data = pn.encode_point() assert data == binascii.unhexlify( "04233ea3b0027127084cd2cd336a13aeef69c598d8af61369a36454a17c6c22ae" diff --git a/tests/hazmat/primitives/test_x25519.py b/tests/hazmat/primitives/test_x25519.py index 8bdc6b49..30dc2818 100644 --- a/tests/hazmat/primitives/test_x25519.py +++ b/tests/hazmat/primitives/test_x25519.py @@ -9,7 +9,6 @@ import os import pytest -from cryptography import utils from cryptography.exceptions import _Reasons from cryptography.hazmat.primitives import serialization from cryptography.hazmat.primitives.asymmetric.x25519 import ( @@ -95,16 +94,11 @@ class TestX25519Exchange(object): with pytest.raises(ValueError): private_key.exchange(public_key) - def test_deprecated_public_bytes(self, backend): - key = X25519PrivateKey.generate().public_key() - with pytest.warns(utils.DeprecatedIn25): - key.public_bytes() - def test_public_bytes_bad_args(self, backend): key = X25519PrivateKey.generate().public_key() with pytest.raises(ValueError): key.public_bytes(None, serialization.PublicFormat.Raw) - with pytest.raises(ValueError): + with pytest.raises(TypeError): key.public_bytes(serialization.Encoding.Raw) # These vectors are also from RFC 7748 |