aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2017-05-23 10:39:10 -0700
committerPaul Kehrer <paul.l.kehrer@gmail.com>2017-05-23 10:39:10 -0700
commit222f59dad4a611d5e559aa546f255258ad065bb1 (patch)
tree2d481362acab01c193dbe4e89de4f028aaeb4d00 /tests
parent7e8cc509f71c41d69368fecae385cda896b9f692 (diff)
downloadcryptography-222f59dad4a611d5e559aa546f255258ad065bb1.tar.gz
cryptography-222f59dad4a611d5e559aa546f255258ad065bb1.tar.bz2
cryptography-222f59dad4a611d5e559aa546f255258ad065bb1.zip
More deprecation warnings (#3579)
* Fixed more deprecation warnings * unused import
Diffstat (limited to 'tests')
-rw-r--r--tests/test_x509.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/tests/test_x509.py b/tests/test_x509.py
index c15940e3..110d8534 100644
--- a/tests/test_x509.py
+++ b/tests/test_x509.py
@@ -9,7 +9,6 @@ import datetime
import ipaddress
import os
import sys
-import warnings
from asn1crypto.x509 import Certificate
@@ -522,8 +521,7 @@ class TestRSACertificate(object):
backend
)
- with warnings.catch_warnings():
- warnings.simplefilter("always", utils.PersistentlyDeprecated)
+ with pytest.deprecated_call():
assert cert.serial == 2
assert cert.serial_number == 2
@@ -534,10 +532,8 @@ class TestRSACertificate(object):
backend
)
- with warnings.catch_warnings():
- warnings.simplefilter("always", utils.PersistentlyDeprecated)
- with pytest.deprecated_call():
- cert.serial
+ with pytest.deprecated_call():
+ cert.serial
def test_load_der_cert(self, backend):
cert = _load_cert(