From 222f59dad4a611d5e559aa546f255258ad065bb1 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Tue, 23 May 2017 10:39:10 -0700 Subject: More deprecation warnings (#3579) * Fixed more deprecation warnings * unused import --- tests/test_x509.py | 10 +++------- 1 file 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( -- cgit v1.2.3