Skip to content

Commit

Permalink
[py] add more test cases for the no_proxy handling
Browse files Browse the repository at this point in the history
  • Loading branch information
AutomatedTester committed Oct 22, 2021
1 parent db37a9f commit 39f4b1b
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def test_get_connection_manager_with_proxy(mock_proxy_settings):
@pytest.mark.parametrize("url",
["*", ".localhost", "localhost:80", "locahost", "127.0.0.1",
"LOCALHOST", "LOCALHOST:80", "http://localhost", "https://localhost",
"test.localhost", " localhost"])
"test.localhost", " localhost", "::1", "127.0.0.2"])
def test_get_connection_manager_when_no_proxy_set(mock_no_proxy_settings, url):
remote_connection = RemoteConnection(url)
conn = remote_connection._get_connection_manager()
Expand Down Expand Up @@ -160,5 +160,5 @@ def mock_no_proxy_settings(monkeypatch):
monkeypatch.setenv("HTTP_PROXY", http_proxy)
monkeypatch.setenv("https_proxy", https_proxy)
monkeypatch.setenv("http_proxy", http_proxy)
monkeypatch.setenv("no_proxy", "65.253.214.253,localhost,127.0.0.1,*zyz.xx")
monkeypatch.setenv("NO_PROXY", "65.253.214.253,localhost,127.0.0.1,*zyz.xx")
monkeypatch.setenv("no_proxy", "65.253.214.253,localhost,127.0.0.1,*zyz.xx,::1")
monkeypatch.setenv("NO_PROXY", "65.253.214.253,localhost,127.0.0.1,*zyz.xx,::1,127.0.0.0/8")

0 comments on commit 39f4b1b

Please sign in to comment.