MCPcopy Index your code
hub / github.com/python/cpython / test_server_side

Method test_server_side

Lib/test/test_ssl.py:745–750  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

743 self.bad_cert_test("badkey.pem")
744
745 def test_server_side(self):
746 # server_hostname doesn't work for server sockets
747 ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER)
748 with socket.socket() as sock:
749 self.assertRaises(ValueError, ctx.wrap_socket, sock, True,
750 server_hostname="some.hostname")
751
752 def test_unknown_channel_binding(self):
753 # should raise ValueError for unknown type

Callers

nothing calls this directly

Calls 2

socketMethod · 0.80
assertRaisesMethod · 0.45

Tested by

no test coverage detected