python3.x requests库取消ssl验证,InsecureRequestWarning

python3.x requests库取消ssl验证,InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See

该错误的原因是因为在请求的时候request.get(url,verify=False)导致的

错误样子:
/usr/local/python/lib/python3.5/site-packages/urllib3/connectionpool.py:858: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning)

解决
import urllib3
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
就搞定了

你可能感兴趣的:(python,pytest)