diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2018-08-23 10:52:15 -0500 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2018-08-23 11:52:15 -0400 |
commit | 0e6c553bc57587dc644430b7336e6bf4d90180a6 (patch) | |
tree | 2ecb2255edf05f6ddc7b082454aab4e6a35c3ea2 /tests | |
parent | 178d04da82bab78bf36a85b2a728dbfaa44fb3de (diff) | |
download | pyopenssl-git-0e6c553bc57587dc644430b7336e6bf4d90180a6.tar.gz |
X509Store.add_cert no longer raises an error on duplicate cert (#787)
* X509Store.add_cert no longer raises an error on duplicate cert
* move changelog entry
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_crypto.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/test_crypto.py b/tests/test_crypto.py index d1c261b..eb4590d 100644 --- a/tests/test_crypto.py +++ b/tests/test_crypto.py @@ -2016,16 +2016,15 @@ class TestX509Store(object): with pytest.raises(TypeError): store.add_cert(cert) - def test_add_cert_rejects_duplicate(self): + def test_add_cert_accepts_duplicate(self): """ - `X509Store.add_cert` raises `OpenSSL.crypto.Error` if an attempt is - made to add the same certificate to the store more than once. + `X509Store.add_cert` doesn't raise `OpenSSL.crypto.Error` if an attempt + is made to add the same certificate to the store more than once. """ cert = load_certificate(FILETYPE_PEM, cleartextCertificatePEM) store = X509Store() store.add_cert(cert) - with pytest.raises(Error): - store.add_cert(cert) + store.add_cert(cert) class TestPKCS12(object): |