Skip to content

Commit

Permalink
tests: Add extra_index_url test case to help redact url
Browse files Browse the repository at this point in the history
  • Loading branch information
Noah Gorny committed Dec 2, 2020
1 parent dce6b34 commit 8bc9c33
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/functional/test_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,17 @@ def test_help_command_redact_auth_from_url(script):
assert 'secret' not in result.stdout


def test_help_command_redact_auth_from_url_with_extra_index_url(script):
"""
Test `help` on various subcommands redact auth from url with extra index url
"""
script.environ['PIP_INDEX_URL'] = 'https://user:secret@example.com'
script.environ['PIP_EXTRA_INDEX_URL'] = 'https://user:secret@example2.com'
result = script.pip('install', '--help')
assert result.returncode == SUCCESS
assert 'secret' not in result.stdout


def test_help_commands_equally_functional(in_memory_pip):
"""
Test if `pip help` and 'pip --help' behave the same way.
Expand Down

0 comments on commit 8bc9c33

Please sign in to comment.