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

Method test_context

Lib/test/test_poplib.py:452–462  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

450 self.assertIn('POP3_SSL', poplib.__all__)
451
452 def test_context(self):
453 ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
454 ctx.check_hostname = False
455 ctx.verify_mode = ssl.CERT_NONE
456
457 self.client.quit()
458 self.client = poplib.POP3_SSL(self.server.host, self.server.port,
459 context=ctx)
460 self.assertIsInstance(self.client.sock, ssl.SSLSocket)
461 self.assertIs(self.client.sock.context, ctx)
462 self.assertStartsWith(self.client.noop(), b'+OK')
463
464 def test_stls(self):
465 self.assertRaises(poplib.error_proto, self.client.stls)

Callers

nothing calls this directly

Calls 5

assertIsInstanceMethod · 0.80
quitMethod · 0.45
assertIsMethod · 0.45
assertStartsWithMethod · 0.45
noopMethod · 0.45

Tested by

no test coverage detected