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

Method test_unknown_channel_binding

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

Source from the content-addressed store, hash-verified

750 server_hostname="some.hostname")
751
752 def test_unknown_channel_binding(self):
753 # should raise ValueError for unknown type
754 s = socket.create_server(('127.0.0.1', 0))
755 c = socket.socket(socket.AF_INET)
756 c.connect(s.getsockname())
757 with test_wrap_socket(c, do_handshake_on_connect=False) as ss:
758 with self.assertRaises(ValueError):
759 ss.get_channel_binding("unknown-type")
760 s.close()
761
762 @unittest.skipUnless("tls-unique" in ssl.CHANNEL_BINDING_TYPES,
763 "'tls-unique' channel binding not available")

Callers

nothing calls this directly

Calls 8

test_wrap_socketFunction · 0.85
socketMethod · 0.80
create_serverMethod · 0.45
connectMethod · 0.45
getsocknameMethod · 0.45
assertRaisesMethod · 0.45
get_channel_bindingMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected