summaryrefslogtreecommitdiff
path: root/test/test_ssl.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_ssl.py')
-rw-r--r--test/test_ssl.py24
1 files changed, 0 insertions, 24 deletions
diff --git a/test/test_ssl.py b/test/test_ssl.py
index f2203282..b36d8d92 100644
--- a/test/test_ssl.py
+++ b/test/test_ssl.py
@@ -41,30 +41,6 @@ class TestSSL:
assert not ssl_.is_ipaddress(addr)
@pytest.mark.parametrize(
- ["has_sni", "server_hostname", "uses_sni"],
- [
- (True, "127.0.0.1", False),
- (False, "www.python.org", False),
- (False, "0.0.0.0", False),
- (True, "www.google.com", True),
- (True, None, False),
- (False, None, False),
- ],
- )
- def test_context_sni_with_ip_address(
- self, monkeypatch, has_sni, server_hostname, uses_sni
- ):
- monkeypatch.setattr(ssl_, "HAS_SNI", has_sni)
-
- sock = mock.Mock()
- context = mock.create_autospec(ssl_.SSLContext)
-
- ssl_.ssl_wrap_socket(sock, server_hostname=server_hostname, ssl_context=context)
-
- expected_hostname = server_hostname if uses_sni else None
- context.wrap_socket.assert_called_with(sock, server_hostname=expected_hostname)
-
- @pytest.mark.parametrize(
["has_sni", "server_hostname", "should_warn"],
[
(True, "www.google.com", False),