MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_unsupported_dtls

Method test_unsupported_dtls

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

Source from the content-addressed store, hash-verified

807 '1.3.6.1.5.5.7.3.2')
808
809 def test_unsupported_dtls(self):
810 s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
811 self.addCleanup(s.close)
812 with self.assertRaises(NotImplementedError) as cx:
813 test_wrap_socket(s, cert_reqs=ssl.CERT_NONE)
814 self.assertEqual(str(cx.exception), "only stream sockets are supported")
815 ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
816 with self.assertRaises(NotImplementedError) as cx:
817 ctx.wrap_socket(s)
818 self.assertEqual(str(cx.exception), "only stream sockets are supported")
819
820 def cert_time_ok(self, timestring, timestamp):
821 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