Skip to content

Commit

Permalink
Fix failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
matteius authored and oz123 committed Jul 11, 2023
1 parent 49b7891 commit 70b77ae
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion tests/integration/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

HAS_WARNED_GITHUB = False

DEFAULT_PRIVATE_PYPI_SERVER = os.environ.get("PIPENV_PYPI_SERVER", "http://localhost:8080/simple")


def try_internet(url="http://httpbin.org/ip", timeout=1.5):
resp = requests.get(url, timeout=timeout)
Expand Down Expand Up @@ -321,7 +323,7 @@ def pipenv_instance_private_pypi(capfdbinary, monkeypatch):
warnings.simplefilter("ignore", category=ResourceWarning)
warnings.filterwarnings("ignore", category=ResourceWarning, message="unclosed.*<ssl.SSLSocket.*>")
try:
yield functools.partial(_PipenvInstance, capfd=capfdbinary, index_url="http://localhost:8080/simple")
yield functools.partial(_PipenvInstance, capfd=capfdbinary, index_url=DEFAULT_PRIVATE_PYPI_SERVER)
finally:
os.umask(original_umask)

Expand Down
3 changes: 2 additions & 1 deletion tests/integration/test_uninstall.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import pytest

from .conftest import DEFAULT_PRIVATE_PYPI_SERVER

from pipenv.utils.shell import temp_environ

Expand Down Expand Up @@ -54,7 +55,7 @@ def test_uninstall_django(pipenv_instance_private_pypi):
def test_mirror_uninstall(pipenv_instance_pypi):
with temp_environ(), pipenv_instance_pypi() as p:

mirror_url = p.index_url
mirror_url = DEFAULT_PRIVATE_PYPI_SERVER
assert "pypi.org" not in mirror_url

c = p.pipenv(f"install Django --pypi-mirror {mirror_url}")
Expand Down

0 comments on commit 70b77ae

Please sign in to comment.