configure cert bundle

Signed-off-by: Dan Ryan <dan@danryan.co>
This commit is contained in:
Dan Ryan
2018-08-22 02:50:58 -04:00
parent e934ccc73c
commit b0085bbd97
4 changed files with 8 additions and 2 deletions
+1
View File
@@ -7,6 +7,7 @@ set -eo pipefail
export PYTHONIOENCODING="utf-8"
export LANG=C.UTF-8
export PIP_PROCESS_DEPENDENCY_LINKS="1"
export REQUESTS_CA_BUNDLE=$(readlink -f ./tests/pytest-pypi/pytest_pypi/certs/cacert.pem)
prefix() {
sed "s/^/ $1: /"
+3
View File
@@ -10,11 +10,14 @@ from pipenv.vendor import requests
from pipenv.vendor import six
from pipenv.vendor import toml
from pytest_pypi.app import prepare_packages as prepare_pypi_packages
from pytest_pypi.certs import where as certs_where
if six.PY2:
class ResourceWarning(Warning):
pass
os.environ["REQUESTS_CA_BUNDLE"] = certs_where()
HAS_WARNED_GITHUB = False
def check_internet():
+3 -1
View File
@@ -94,7 +94,9 @@ def test_venv_file_with_path(PipenvInstance, pypi):
c = p.pipenv('install')
assert c.return_code == 0
c = p.pipenv('--venv')
assert c.return_code == 0
venv_loc = Path(c.out.strip())
venv_loc = Path(p.pipenv('--venv').out.strip())
assert venv_loc.joinpath('.project').exists()
assert venv_loc == Path(venv_path.name)
+1 -1
View File
@@ -15,7 +15,7 @@ import os.path
def where():
"""Return the preferred certificate bundle."""
# vendored bundle inside Requests
return os.path.join(os.path.dirname(__file__), 'certs', 'cacert.pem')
return os.path.join(os.path.abspath(os.path.dirname(__file__), 'certs', 'cacert.pem'))
if __name__ == '__main__':
print(where())