From 5c07d7a87c54a8532b49ba41febe8d526e5734d8 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Wed, 23 Jan 2019 22:00:14 -0500 Subject: Fixes #4734 -- Deal with deprecated things (#4736) * Fixes #4734 -- Deal with deprecated things - Make year based aliases of PersistentlyDeprecated so we can easily assess age - Removed encode/decode rfc6979 signature - Removed Certificate.serial * Unused import --- tests/x509/test_x509_ext.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tests/x509/test_x509_ext.py') diff --git a/tests/x509/test_x509_ext.py b/tests/x509/test_x509_ext.py index 6de105fa..6cf388da 100644 --- a/tests/x509/test_x509_ext.py +++ b/tests/x509/test_x509_ext.py @@ -1673,11 +1673,11 @@ class TestKeyUsageExtension(object): class TestDNSName(object): def test_init_deprecated(self): pytest.importorskip("idna") - with pytest.warns(utils.DeprecatedIn21): + with pytest.warns(utils.CryptographyDeprecationWarning): name = x509.DNSName(u".\xf5\xe4\xf6\xfc.example.com") assert name.value == u".xn--4ca7aey.example.com" - with pytest.warns(utils.DeprecatedIn21): + with pytest.warns(utils.CryptographyDeprecationWarning): name = x509.DNSName(u"\xf5\xe4\xf6\xfc.example.com") assert name.value == u"xn--4ca7aey.example.com" @@ -1792,7 +1792,7 @@ class TestRFC822Name(object): def test_idna(self): pytest.importorskip("idna") - with pytest.warns(utils.DeprecatedIn21): + with pytest.warns(utils.CryptographyDeprecationWarning): gn = x509.RFC822Name(u"email@em\xe5\xefl.com") assert gn.value == u"email@xn--eml-vla4c.com" @@ -1832,7 +1832,7 @@ class TestUniformResourceIdentifier(object): def test_idna_no_port(self): pytest.importorskip("idna") - with pytest.warns(utils.DeprecatedIn21): + with pytest.warns(utils.CryptographyDeprecationWarning): gn = x509.UniformResourceIdentifier( u"http://\u043f\u044b\u043a\u0430.cryptography" ) @@ -1841,7 +1841,7 @@ class TestUniformResourceIdentifier(object): def test_idna_with_port(self): pytest.importorskip("idna") - with pytest.warns(utils.DeprecatedIn21): + with pytest.warns(utils.CryptographyDeprecationWarning): gn = x509.UniformResourceIdentifier( u"gopher://\u043f\u044b\u043a\u0430.cryptography:70/some/path" ) @@ -1856,7 +1856,7 @@ class TestUniformResourceIdentifier(object): def test_query_and_fragment(self): pytest.importorskip("idna") - with pytest.warns(utils.DeprecatedIn21): + with pytest.warns(utils.CryptographyDeprecationWarning): gn = x509.UniformResourceIdentifier( u"ldap://\u043f\u044b\u043a\u0430.cryptography:90/path?query=" u"true#somedata" -- cgit v1.2.3