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

Method bad_cert_test

Lib/test/test_ssl.py:723–731  ·  view source on GitHub ↗

Check that trying to use the given client certificate fails

(self, certfile)

Source from the content-addressed store, hash-verified

721 )
722
723 def bad_cert_test(self, certfile):
724 """Check that trying to use the given client certificate fails"""
725 certfile = os.path.join(os.path.dirname(__file__) or os.curdir,
726 "certdata", certfile)
727 sock = socket.socket()
728 self.addCleanup(sock.close)
729 with self.assertRaises(ssl.SSLError):
730 test_wrap_socket(sock,
731 certfile=certfile)
732
733 def test_empty_cert(self):
734 """Wrapping with an empty cert file"""

Callers 3

test_empty_certMethod · 0.95
test_malformed_certMethod · 0.95
test_malformed_keyMethod · 0.95

Calls 6

test_wrap_socketFunction · 0.85
socketMethod · 0.80
addCleanupMethod · 0.80
joinMethod · 0.45
dirnameMethod · 0.45
assertRaisesMethod · 0.45

Tested by

no test coverage detected