diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_x509_ext.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/test_x509_ext.py b/tests/test_x509_ext.py index ec6127ab..03a3730a 100644 --- a/tests/test_x509_ext.py +++ b/tests/test_x509_ext.py @@ -1073,6 +1073,11 @@ class TestExtensions(object): exts.get_extension_for_class(x509.IssuerAlternativeName) assert exc.value.oid == ExtensionOID.ISSUER_ALTERNATIVE_NAME + def test_unrecognized_extension_for_class(self): + exts = x509.Extensions([]) + with pytest.raises(TypeError): + exts.get_extension_for_class(x509.UnrecognizedExtension) + def test_indexing(self, backend): cert = _load_cert( os.path.join("x509", "cryptography.io.pem"), |