diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2014-07-02 22:56:01 -0500 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2014-07-02 22:56:01 -0500 |
commit | 2a39f7f3c80b9c725b586ca96defbe5bad62bf83 (patch) | |
tree | b5fba2d28e2d2b1b9de2fe3e8cf9e55ba9c95696 /tests/hazmat/bindings | |
parent | 751c53b6f7cdc3e8301dd8672091acc105ed8874 (diff) | |
download | cryptography-2a39f7f3c80b9c725b586ca96defbe5bad62bf83.tar.gz cryptography-2a39f7f3c80b9c725b586ca96defbe5bad62bf83.tar.bz2 cryptography-2a39f7f3c80b9c725b586ca96defbe5bad62bf83.zip |
switch to env variable based static/dynamic switch for windows
Diffstat (limited to 'tests/hazmat/bindings')
-rw-r--r-- | tests/hazmat/bindings/test_openssl.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/hazmat/bindings/test_openssl.py b/tests/hazmat/bindings/test_openssl.py index 58d7602b..84f46b2e 100644 --- a/tests/hazmat/bindings/test_openssl.py +++ b/tests/hazmat/bindings/test_openssl.py @@ -15,7 +15,9 @@ from __future__ import absolute_import, division, print_function import pytest -from cryptography.hazmat.bindings.openssl.binding import Binding +from cryptography.hazmat.bindings.openssl.binding import ( + Binding, _get_windows_libraries +) class TestOpenSSL(object): @@ -137,3 +139,11 @@ class TestOpenSSL(object): resp = b.lib.SSL_set_mode(ssl, b.lib.SSL_OP_ALL) assert resp == b.lib.SSL_OP_ALL assert b.lib.SSL_OP_ALL == b.lib.SSL_get_mode(ssl) + + def test_windows_static_dynamic_libraries(self): + assert len(_get_windows_libraries("static")) == 7 + + assert len(_get_windows_libraries("dynamic")) == 3 + + with pytest.raises(ValueError): + _get_windows_libraries("notvalid") |