aboutsummaryrefslogtreecommitdiffstats
path: root/tests/hazmat/backends
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2015-09-25 18:05:14 -0400
committerAlex Gaynor <alex.gaynor@gmail.com>2015-09-25 18:05:14 -0400
commitd042614ab4aa6aea1e18b7001663f971a6fe6f8a (patch)
tree88f4989ede0960f372396d931f6061e8a7f324a9 /tests/hazmat/backends
parente8fbbe7e638cc8baf1cacf27c54e7a2ddac9ef1a (diff)
parent7712edc5fa2bc5244221c35cf97e1b58f5981446 (diff)
downloadcryptography-d042614ab4aa6aea1e18b7001663f971a6fe6f8a.tar.gz
cryptography-d042614ab4aa6aea1e18b7001663f971a6fe6f8a.tar.bz2
cryptography-d042614ab4aa6aea1e18b7001663f971a6fe6f8a.zip
Merge pull request #2368 from reaperhulk/asserts-begone
start converting asserts to a function call
Diffstat (limited to 'tests/hazmat/backends')
-rw-r--r--tests/hazmat/backends/test_openssl.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/hazmat/backends/test_openssl.py b/tests/hazmat/backends/test_openssl.py
index debea5a2..5264ba55 100644
--- a/tests/hazmat/backends/test_openssl.py
+++ b/tests/hazmat/backends/test_openssl.py
@@ -17,7 +17,7 @@ from cryptography import utils
from cryptography.exceptions import InternalError, _Reasons
from cryptography.hazmat.backends.interfaces import RSABackend
from cryptography.hazmat.backends.openssl.backend import (
- Backend, backend
+ Backend, UnhandledOpenSSLError, backend
)
from cryptography.hazmat.backends.openssl.ec import _sn_to_elliptic_curve
from cryptography.hazmat.primitives import hashes, serialization
@@ -122,6 +122,11 @@ class TestOpenSSL(object):
with raises_unsupported_algorithm(_Reasons.UNSUPPORTED_CIPHER):
cipher.encryptor()
+ def test_openssl_assert(self):
+ backend.openssl_assert(True)
+ with pytest.raises(UnhandledOpenSSLError):
+ backend.openssl_assert(False)
+
def test_consume_errors(self):
for i in range(10):
backend._lib.ERR_put_error(backend._lib.ERR_LIB_EVP, 0, 0,