summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTomas Tomecek <ttomecek@redhat.com>2016-11-01 11:52:25 +0100
committerTomas Tomecek <ttomecek@redhat.com>2016-11-14 09:05:26 +0100
commit9a485b30ee465d66ef9e6bb17ca721a1f9c218a7 (patch)
tree565678c6cec5f8350a1970130dae530cdb56b0f4 /tests
parent2ca68f3d08a51f02f531a84db5a4f1fd6f758f76 (diff)
downloaddocker-py-9a485b30ee465d66ef9e6bb17ca721a1f9c218a7.tar.gz
ssl,test: OpenSSL may not support ssl2
Fixes #1265 Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/ssladapter_test.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/unit/ssladapter_test.py b/tests/unit/ssladapter_test.py
index 2ad1cad..8c905cf 100644
--- a/tests/unit/ssladapter_test.py
+++ b/tests/unit/ssladapter_test.py
@@ -24,7 +24,8 @@ class SSLAdapterTest(base.BaseTestCase):
ssl_context = ssladapter.urllib3.util.ssl_.create_urllib3_context()
assert ssl_context.options & OP_NO_SSLv3
- assert ssl_context.options & OP_NO_SSLv2
+ # if OpenSSL is compiled without SSL2 support, OP_NO_SSLv2 will be 0
+ assert not bool(OP_NO_SSLv2) or ssl_context.options & OP_NO_SSLv2
assert not ssl_context.options & OP_NO_TLSv1