mirror of
https://github.com/webrecorder/pywb.git
synced 2025-03-15 00:03:28 +01:00
tests fix: add PYWB_NO_VERIFY_SSL env var for tests to avoid failing tests when connecting to external services (#760)
- if variable is set, RemoteIndexSource loading does not verify certs
This commit is contained in:
parent
1249b41dba
commit
16135d956a
@ -22,6 +22,10 @@ import requests
|
|||||||
|
|
||||||
import re
|
import re
|
||||||
import logging
|
import logging
|
||||||
|
import os
|
||||||
|
|
||||||
|
|
||||||
|
no_verify = os.environ.get("PYWB_NO_VERIFY_SSL")
|
||||||
|
|
||||||
|
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
@ -46,6 +50,8 @@ class BaseIndexSource(object):
|
|||||||
self.sesh = requests.Session()
|
self.sesh = requests.Session()
|
||||||
self.sesh.mount('http://', adapter)
|
self.sesh.mount('http://', adapter)
|
||||||
self.sesh.mount('https://', adapter)
|
self.sesh.mount('https://', adapter)
|
||||||
|
if no_verify:
|
||||||
|
self.sesh.verify = False
|
||||||
|
|
||||||
|
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
|
Loading…
x
Reference in New Issue
Block a user