From 8ee102762525ff7619bc5b9c16f53f4c8537abfc Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Wed, 16 Oct 2013 18:00:50 -0700 Subject: Refactor how cipher names are computed --- tests/bindings/test_openssl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/bindings/test_openssl.py') diff --git a/tests/bindings/test_openssl.py b/tests/bindings/test_openssl.py index e5b78d18..2d513308 100644 --- a/tests/bindings/test_openssl.py +++ b/tests/bindings/test_openssl.py @@ -30,4 +30,4 @@ class TestOpenSSL(object): assert api.openssl_version_text().startswith("OpenSSL") def test_supports_cipher(self): - assert api.supports_cipher("not-a-real-cipher") is False + assert api.supports_cipher(None, None) is False -- cgit v1.2.3 From a4da1d2a6e568e2ec4c474c5d41bbc445f7c90e8 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Wed, 16 Oct 2013 19:07:33 -0700 Subject: Up our coverage --- tests/bindings/test_openssl.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests/bindings/test_openssl.py') diff --git a/tests/bindings/test_openssl.py b/tests/bindings/test_openssl.py index 2d513308..bf201e4d 100644 --- a/tests/bindings/test_openssl.py +++ b/tests/bindings/test_openssl.py @@ -11,7 +11,11 @@ # See the License for the specific language governing permissions and # limitations under the License. +import pytest + from cryptography.bindings.openssl.api import api +from cryptography.primitives.block.ciphers import AES +from cryptography.primitives.block.modes import CBC class TestOpenSSL(object): @@ -31,3 +35,7 @@ class TestOpenSSL(object): def test_supports_cipher(self): assert api.supports_cipher(None, None) is False + + def test_register_duplicate_cipher_adapter(self): + with pytest.raises(ValueError): + api.register_cipher_adapter(AES, CBC, None) -- cgit v1.2.3