summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/isolated/ssl_context_properties.py (renamed from tests/isolated/green_ssl_py36_properties.py)10
-rw-r--r--tests/ssl_test.py15
2 files changed, 17 insertions, 8 deletions
diff --git a/tests/isolated/green_ssl_py36_properties.py b/tests/isolated/ssl_context_properties.py
index aa6b5b5..f28155e 100644
--- a/tests/isolated/green_ssl_py36_properties.py
+++ b/tests/isolated/ssl_context_properties.py
@@ -1,16 +1,16 @@
__test__ = False
-if __name__ == '__main__':
+if __name__ == "__main__":
import eventlet
eventlet.monkey_patch()
try:
eventlet.wrap_ssl(
- eventlet.listen(('localhost', 0)),
- certfile='does-not-exist',
- keyfile='does-not-exist',
+ eventlet.listen(("localhost", 0)),
+ certfile="does-not-exist",
+ keyfile="does-not-exist",
server_side=True)
except IOError as ex:
assert ex.errno == 2
- print('pass')
+ print("pass")
diff --git a/tests/ssl_test.py b/tests/ssl_test.py
index ebaead2..38ebe9a 100644
--- a/tests/ssl_test.py
+++ b/tests/ssl_test.py
@@ -396,6 +396,15 @@ class SSLTest(tests.LimitedTestCase):
client.recv(64)
server_coro.wait()
- @tests.skip_if(sys.version_info < (3, 7))
- def test_context_version_setters(self):
- tests.run_isolated("ssl_context_version_setters.py")
+
+@tests.skip_if(sys.version_info < (3, 7))
+def test_context_version_setters():
+ tests.run_isolated("ssl_context_version_setters.py")
+
+
+def test_context_properties():
+ # https://github.com/eventlet/eventlet/issues/371
+ context = ssl.create_default_context()
+ context.options |= context.options
+
+ tests.run_isolated("ssl_context_properties.py")