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
diff --git a/tests/x509/test_x509.py b/tests/x509/test_x509.py
index 97b5a74..27e284a 100644
--- a/tests/x509/test_x509.py
+++ b/tests/x509/test_x509.py
@@ -577,7 +577,7 @@
backend
)
- with pytest.deprecated_call():
+ with pytest.warns(utils.CryptographyDeprecationWarning):
assert cert.serial == 2
assert cert.serial_number == 2
@@ -588,7 +588,7 @@
backend
)
- with pytest.deprecated_call():
+ with pytest.warns(utils.CryptographyDeprecationWarning):
cert.serial
def test_load_der_cert(self, backend):