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

Method test_unsupported_dtls

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

Source from the content-addressed store, hash-verified

888 '1.3.6.1.5.5.7.3.2')
889
890 def test_unsupported_dtls(self):
891 s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
892 self.addCleanup(s.close)
893 with self.assertRaises(NotImplementedError) as cx:
894 test_wrap_socket(s, cert_reqs=ssl.CERT_NONE)
895 self.assertEqual(str(cx.exception), "only stream sockets are supported")
896 ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
897 with self.assertRaises(NotImplementedError) as cx:
898 ctx.wrap_socket(s)
899 self.assertEqual(str(cx.exception), "only stream sockets are supported")
900
901 def cert_time_ok(self, timestring, timestamp):
902 self.assertEqual(ssl.cert_time_to_seconds(timestring), timestamp)

Callers

nothing calls this directly

Calls 7

wrap_socketMethod · 0.95
test_wrap_socketFunction · 0.85
strFunction · 0.85
socketMethod · 0.80
addCleanupMethod · 0.80
assertRaisesMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected