From 5001c3f7479ff28457948a582e5e7446ac838ca6 Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Sat, 4 Jan 2014 13:56:19 -0600 Subject: cover a missing branch in the commoncrypto bindings --- tests/hazmat/bindings/test_commoncrypto.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'tests/hazmat/bindings') diff --git a/tests/hazmat/bindings/test_commoncrypto.py b/tests/hazmat/bindings/test_commoncrypto.py index 385eeeb6..1eb71151 100644 --- a/tests/hazmat/bindings/test_commoncrypto.py +++ b/tests/hazmat/bindings/test_commoncrypto.py @@ -13,13 +13,19 @@ import pytest -from cryptography.hazmat.bindings.commoncrypto.binding import Binding - @pytest.mark.commoncrypto class TestCommonCrypto(object): def test_binding_loads(self): + from cryptography.hazmat.bindings.commoncrypto.binding import Binding binding = Binding() assert binding assert binding.lib assert binding.ffi + + def test_binding_returns_same_lib(self): + from cryptography.hazmat.bindings.commoncrypto.binding import Binding + binding = Binding() + binding2 = Binding() + assert binding.lib == binding2.lib + assert binding.ffi == binding2.ffi -- cgit v1.2.3