aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHynek Schlawack <hs@ox.cx>2013-11-23 08:15:41 -0800
committerHynek Schlawack <hs@ox.cx>2013-11-23 08:15:41 -0800
commit90501724c5b3d73fea5a4242fa09c32277c6c210 (patch)
treec24d1f5cdcb132f1dbae1c40566ebb3a8d16370b
parent8cf523ead464e758d1aa22a7a8abbc2eae2c9404 (diff)
parent87e113f2705b11fc395d7070d7ca8b89f2954631 (diff)
downloadcryptography-90501724c5b3d73fea5a4242fa09c32277c6c210.tar.gz
cryptography-90501724c5b3d73fea5a4242fa09c32277c6c210.tar.bz2
cryptography-90501724c5b3d73fea5a4242fa09c32277c6c210.zip
Merge pull request #275 from alex/branch-coverage
Fixed branch coverage
-rw-r--r--tests/hazmat/bindings/test_openssl.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/hazmat/bindings/test_openssl.py b/tests/hazmat/bindings/test_openssl.py
index 7ad1ea75..0ebf38af 100644
--- a/tests/hazmat/bindings/test_openssl.py
+++ b/tests/hazmat/bindings/test_openssl.py
@@ -74,3 +74,20 @@ class TestOpenSSL(object):
def test_handle_unknown_error(self):
with pytest.raises(SystemError):
backend._handle_error_code(0, 0, 0)
+
+ with pytest.raises(SystemError):
+ backend._handle_error_code(backend.lib.ERR_LIB_EVP, 0, 0)
+
+ with pytest.raises(SystemError):
+ backend._handle_error_code(
+ backend.lib.ERR_LIB_EVP,
+ backend.lib.EVP_F_EVP_ENCRYPTFINAL_EX,
+ 0
+ )
+
+ with pytest.raises(SystemError):
+ backend._handle_error_code(
+ backend.lib.ERR_LIB_EVP,
+ backend.lib.EVP_F_EVP_DECRYPTFINAL_EX,
+ 0
+ )