summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2014-11-25 17:23:22 +0100
committerBenjamin Peterson <benjamin@python.org>2014-11-25 17:23:22 +0100
commit28f244972289daba3fae766a6354ef4064288392 (patch)
tree8c9edbc226c1a2e47965ce6d5477233cc7a56f67 /tests
parent1863bff7dd61804ed1ab44badb1b87bccd0ae4d2 (diff)
downloadtrollius-28f244972289daba3fae766a6354ef4064288392.tar.gz
Python issue #22921: Don't require OpenSSL SNI to pass hostname to ssl
functions. Patch by Donald Stufft.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_events.py8
-rw-r--r--tests/test_selector_events.py2
2 files changed, 1 insertions, 9 deletions
diff --git a/tests/test_events.py b/tests/test_events.py
index fab3259..ea657fd 100644
--- a/tests/test_events.py
+++ b/tests/test_events.py
@@ -12,9 +12,6 @@ try:
import ssl
except ImportError:
ssl = None
- HAS_SNI = False
-else:
- from ssl import HAS_SNI
import subprocess
import sys
import threading
@@ -857,7 +854,6 @@ class EventLoopTestsMixin:
server.close()
@unittest.skipIf(ssl is None, 'No ssl module')
- @unittest.skipUnless(HAS_SNI, 'No SNI support in ssl module')
def test_create_server_ssl_verify_failed(self):
proto = MyProto(loop=self.loop)
server, host, port = self._make_ssl_server(
@@ -882,7 +878,6 @@ class EventLoopTestsMixin:
server.close()
@unittest.skipIf(ssl is None, 'No ssl module')
- @unittest.skipUnless(HAS_SNI, 'No SNI support in ssl module')
@unittest.skipUnless(hasattr(socket, 'AF_UNIX'), 'No UNIX Sockets')
def test_create_unix_server_ssl_verify_failed(self):
proto = MyProto(loop=self.loop)
@@ -909,7 +904,6 @@ class EventLoopTestsMixin:
server.close()
@unittest.skipIf(ssl is None, 'No ssl module')
- @unittest.skipUnless(HAS_SNI, 'No SNI support in ssl module')
def test_create_server_ssl_match_failed(self):
proto = MyProto(loop=self.loop)
server, host, port = self._make_ssl_server(
@@ -937,7 +931,6 @@ class EventLoopTestsMixin:
server.close()
@unittest.skipIf(ssl is None, 'No ssl module')
- @unittest.skipUnless(HAS_SNI, 'No SNI support in ssl module')
@unittest.skipUnless(hasattr(socket, 'AF_UNIX'), 'No UNIX Sockets')
def test_create_unix_server_ssl_verified(self):
proto = MyProto(loop=self.loop)
@@ -963,7 +956,6 @@ class EventLoopTestsMixin:
server.close()
@unittest.skipIf(ssl is None, 'No ssl module')
- @unittest.skipUnless(HAS_SNI, 'No SNI support in ssl module')
def test_create_server_ssl_verified(self):
proto = MyProto(loop=self.loop)
server, host, port = self._make_ssl_server(
diff --git a/tests/test_selector_events.py b/tests/test_selector_events.py
index 528da39..8eba56c 100644
--- a/tests/test_selector_events.py
+++ b/tests/test_selector_events.py
@@ -1408,7 +1408,7 @@ class SelectorSslTransportTests(test_utils.TestCase):
self.assertEqual(tr._conn_lost, 1)
self.assertEqual(1, self.loop.remove_reader_count[1])
- @unittest.skipIf(ssl is None or not ssl.HAS_SNI, 'No SNI support')
+ @unittest.skipIf(ssl is None, 'No SSL support')
def test_server_hostname(self):
_SelectorSslTransport(
self.loop, self.sock, self.protocol, self.sslcontext,