Merge pull request #1353 from nyov/test-no-proxies

[MRG+1] Unset environment proxies for tests
This commit is contained in:
Daniel Graña 2015-08-03 09:49:50 -03:00
commit cbfb24dbeb
1 changed files with 7 additions and 0 deletions

View File

@ -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: