diff options
author | Joern Heissler <joern@fishpond.co.nz> | 2016-01-18 00:24:44 +0100 |
---|---|---|
committer | Joern Heissler <joern@fishpond.co.nz> | 2016-01-18 00:24:44 +0100 |
commit | fbda8ce83d8aa774bbd5438dfd98def87585df3b (patch) | |
tree | f89002fc90c97980d9cea0b4b33b2b382a062714 /tests | |
parent | 1bd77e2f4ee2fcdd9233ea36ed74edeee02817c5 (diff) | |
download | cryptography-fbda8ce83d8aa774bbd5438dfd98def87585df3b.tar.gz cryptography-fbda8ce83d8aa774bbd5438dfd98def87585df3b.tar.bz2 cryptography-fbda8ce83d8aa774bbd5438dfd98def87585df3b.zip |
Change method to property
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_x509.py | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/tests/test_x509.py b/tests/test_x509.py index fde0755e..0eef0bc3 100644 --- a/tests/test_x509.py +++ b/tests/test_x509.py @@ -18,7 +18,7 @@ import pytest import six from cryptography import utils, x509 -from cryptography.exceptions import UnsupportedAlgorithm, InvalidSignature +from cryptography.exceptions import UnsupportedAlgorithm from cryptography.hazmat.backends.interfaces import ( DSABackend, EllipticCurveBackend, RSABackend, X509Backend ) @@ -1241,23 +1241,21 @@ class TestRSACertificateRequest(object): with pytest.raises(TypeError): request.public_bytes('NotAnEncoding') - def test_verify_bad(self, backend): + def test_signature_invalid(self, backend): request = _load_cert( os.path.join("x509", "requests", "invalid_signature.pem"), x509.load_pem_x509_csr, backend ) + assert not request.is_signature_valid - with pytest.raises(InvalidSignature): - request.verify() - - def test_verify_good(self, backend): + def test_signature_valid(self, backend): request = _load_cert( os.path.join("x509", "requests", "rsa_sha256.pem"), x509.load_pem_x509_csr, backend ) - request.verify() + assert request.is_signature_valid @pytest.mark.parametrize( ("request_path", "loader_func", "encoding"), |