aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/cryptography/x509/extensions.py4
-rw-r--r--tests/test_x509_ext.py5
2 files changed, 7 insertions, 2 deletions
diff --git a/src/cryptography/x509/extensions.py b/src/cryptography/x509/extensions.py
index 938a98e9..09d76501 100644
--- a/src/cryptography/x509/extensions.py
+++ b/src/cryptography/x509/extensions.py
@@ -85,7 +85,9 @@ class Extensions(object):
if isinstance(ext.value, extclass):
return ext
- raise ExtensionNotFound("No {0} extension was found".format(extclass), extclass)
+ raise ExtensionNotFound(
+ "No {0} extension was found".format(extclass), extclass
+ )
def __iter__(self):
return iter(self._extensions)
diff --git a/tests/test_x509_ext.py b/tests/test_x509_ext.py
index a05dc2a4..2d3339c3 100644
--- a/tests/test_x509_ext.py
+++ b/tests/test_x509_ext.py
@@ -834,7 +834,9 @@ class TestExtensions(object):
def test_one_extension_get_for_class(self, backend):
cert = _load_cert(
- os.path.join("x509", "custom", "basic_constraints_not_critical.pem"),
+ os.path.join(
+ "x509", "custom", "basic_constraints_not_critical.pem"
+ ),
x509.load_pem_x509_certificate,
backend
)
@@ -843,6 +845,7 @@ class TestExtensions(object):
assert isinstance(ext.value, x509.BasicConstraints)
+
@pytest.mark.requires_backend_interface(interface=RSABackend)
@pytest.mark.requires_backend_interface(interface=X509Backend)
class TestBasicConstraintsExtension(object):