diff options
author | David Reid <dreid@dreid.org> | 2013-11-04 14:43:05 -0800 |
---|---|---|
committer | David Reid <dreid@dreid.org> | 2013-11-04 14:43:05 -0800 |
commit | 79eaa7efa2aaafd62ffeee7385526f14647e5a7e (patch) | |
tree | 38df1741f53aaa1d49f2bc1c04e98dd1db51e241 /tests/hazmat | |
parent | 876a5eee10102bc008fdc56455b549f36d925436 (diff) | |
parent | b2fc8ac5a367dbedc8d3bbd57dd16deb67b08d01 (diff) | |
download | cryptography-79eaa7efa2aaafd62ffeee7385526f14647e5a7e.tar.gz cryptography-79eaa7efa2aaafd62ffeee7385526f14647e5a7e.tar.bz2 cryptography-79eaa7efa2aaafd62ffeee7385526f14647e5a7e.zip |
Merge pull request #221 from alex/move-ffi-to-class
Moved the cffi attributes on the OpenSSL backend to be class attributes
Diffstat (limited to 'tests/hazmat')
-rw-r--r-- | tests/hazmat/bindings/test_openssl.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/hazmat/bindings/test_openssl.py b/tests/hazmat/bindings/test_openssl.py index 9ce882e4..fb01c10a 100644 --- a/tests/hazmat/bindings/test_openssl.py +++ b/tests/hazmat/bindings/test_openssl.py @@ -13,7 +13,7 @@ import pytest -from cryptography.hazmat.bindings.openssl.backend import backend +from cryptography.hazmat.bindings.openssl.backend import backend, Backend from cryptography.hazmat.primitives.block.ciphers import AES from cryptography.hazmat.primitives.block.modes import CBC @@ -39,3 +39,8 @@ class TestOpenSSL(object): def test_register_duplicate_cipher_adapter(self): with pytest.raises(ValueError): backend.ciphers.register_cipher_adapter(AES, CBC, None) + + def test_instances_share_ffi(self): + b = Backend() + assert b.ffi is backend.ffi + assert b.lib is backend.lib |