aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhoebe Queen <foibey@gmail.com>2015-08-12 10:54:46 +0100
committerPhoebe Queen <foibey@gmail.com>2015-08-12 10:54:46 +0100
commitc93752b2f97b54ee3ea5f9b3c89151d06ef3a919 (patch)
tree88f8b41ba38c3bc6b35400606a7369e8110c5a61
parentecae981f3a17236caee76bc95c5881db0b0d39b3 (diff)
downloadcryptography-c93752b2f97b54ee3ea5f9b3c89151d06ef3a919.tar.gz
cryptography-c93752b2f97b54ee3ea5f9b3c89151d06ef3a919.tar.bz2
cryptography-c93752b2f97b54ee3ea5f9b3c89151d06ef3a919.zip
making tests more explicit
-rw-r--r--tests/test_x509_ext.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/tests/test_x509_ext.py b/tests/test_x509_ext.py
index 040347db..14df9a22 100644
--- a/tests/test_x509_ext.py
+++ b/tests/test_x509_ext.py
@@ -840,12 +840,10 @@ class TestExtensions(object):
x509.load_pem_x509_certificate,
backend
)
- ext = cert.extensions
- assert len(ext) == 0
- assert list(ext) == []
+ exts = cert.extensions
with pytest.raises(x509.ExtensionNotFound) as exc:
- ext.get_extension_for_class(x509.BasicConstraints)
-
+ ext = exts.get_extension_for_class(x509.BasicConstraints)
+ assert ext is None
assert exc.value.oid == ExtensionOID.BASIC_CONSTRAINTS
def test_one_extension_get_for_class(self, backend):
@@ -858,7 +856,6 @@ class TestExtensions(object):
)
ext = cert.extensions.get_extension_for_class(x509.BasicConstraints)
assert ext is not None
-
assert isinstance(ext.value, x509.BasicConstraints)