报错:

ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1045)

解决办法 :

原因是 request 模块发送请求函数有个参数 verify 值默认为 True.
使用 httprunner 则可在用例 yml 或 json 文件中将 config 或 teststep 中该参数设置为 False 跳过证书验证。

-   config:
...
verify: False
- test:
...
request:
verify: False

如:

yml运行时报错SSL: CERTIFICATE_VERIFY_FAILED 解决verify设置False.

 

 

python中requests请求时:

采用 verify=False 来关闭校验

response=requests.get(url='',verify=False)

 

相关文章:

  • 2021-07-26
  • 2021-11-23
  • 2022-02-22
  • 2022-12-23
  • 2021-06-05
  • 2022-12-23
  • 2021-10-16
猜你喜欢
  • 2021-08-05
  • 2022-12-23
  • 2022-02-02
  • 2022-12-23
  • 2021-09-03
相关资源
相似解决方案