From 87e113f2705b11fc395d7070d7ca8b89f2954631 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Sat, 23 Nov 2013 07:54:36 -0800 Subject: Fixed branch coverage --- tests/hazmat/bindings/test_openssl.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'tests') 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 + ) -- cgit v1.2.3