From 1e0f1c8dc3d121aa6ec7a9d7ee2a0f047935d073 Mon Sep 17 00:00:00 2001 From: JoshuaMoelans <60878493+JoshuaMoelans@users.noreply.github.com> Date: Fri, 15 Nov 2024 13:30:42 +0100 Subject: [PATCH] test: add special case for Windows Autoproxy --- tests/test_integration_crashpad.py | 1 - tests/test_integration_http.py | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/test_integration_crashpad.py b/tests/test_integration_crashpad.py index 74b9cbf62..45b0efcdd 100644 --- a/tests/test_integration_crashpad.py +++ b/tests/test_integration_crashpad.py @@ -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 diff --git a/tests/test_integration_http.py b/tests/test_integration_http.py index 880093e79..639c11bad 100644 --- a/tests/test_integration_http.py +++ b/tests/test_integration_http.py @@ -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()