def testSslCertValidationWithSelfSignedCaCert(self):
if sys.version_info >= (2, 7):
other_ca_certs = os.path.join(
os.path.dirname(os.path.abspath(httplib2.__file__ )), 'test',
'other_cacerts.txt')
http = httplib2.Http(ca_certs=other_ca_certs)
if sys.platform != 'darwin':
with self.assertRaises(httplib2.SSLHandshakeError):
http.request('https://www.google.com/', 'GET')
评论列表
文章目录