Skip to content

Commit

Permalink
test: add special case for Windows Autoproxy
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaMoelans committed Nov 15, 2024
1 parent 63f2f58 commit 1e0f1c8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 0 additions & 1 deletion tests/test_integration_crashpad.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ def test_crashpad_crash_proxy(cmake, httpserver, run_args, proxy_status):
elif run_args == ["socks5-proxy"] and proxy_status == ["off"]:
# Apple's NSURLSession will send the request even if the socks proxy fails
# https://forums.developer.apple.com/forums/thread/705504?answerId=712418022#712418022
# hence there is no (socks5-proxy, off) tuple in the AssertionError catch above
assert len(httpserver.log) == (1 if (sys.platform == "darwin") else 0)
return

Expand Down
4 changes: 3 additions & 1 deletion tests/test_integration_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,9 @@ def test_capture_proxy(cmake, httpserver, run_args, proxy_status):
if proxy_status == ["on"]:
assert len(httpserver.log) == 2
elif proxy_status == ["off"]:
assert len(httpserver.log) == 0
# Window's Autoproxy will send the request even if the http proxy fails
# https://learn.microsoft.com/en-us/windows/win32/winhttp/winhttp-autoproxy-support
assert len(httpserver.log) == (2 if (sys.platform == "win32") else 0)
finally:
if proxy_process:
proxy_process.terminate()
Expand Down

0 comments on commit 1e0f1c8

Please sign in to comment.