mirror of https://github.com/scrapy/scrapy.git
Merge pull request #1353 from nyov/test-no-proxies
[MRG+1] Unset environment proxies for tests
This commit is contained in:
commit
cbfb24dbeb
|
|
@ -6,6 +6,13 @@ see http://doc.scrapy.org/en/latest/contributing.html#running-tests
|
|||
|
||||
import os
|
||||
|
||||
# ignore system-wide proxies for tests
|
||||
# which would send requests to a totally unsuspecting server
|
||||
# (e.g. because urllib does not fully understand the proxy spec)
|
||||
os.environ['http_proxy'] = ''
|
||||
os.environ['https_proxy'] = ''
|
||||
os.environ['ftp_proxy'] = ''
|
||||
|
||||
try:
|
||||
import unittest.mock as mock
|
||||
except ImportError:
|
||||
|
|
|
|||
Loading…
Reference in New Issue