Files
browser-use/tests/ci/browser
Saurav Panda 44e7b1f082 fix(tests): patch TimeoutWrappedCDPClient at its new construction site
Earlier commit 9a09c4d7 swapped the CDPClient construction in
browser_use/browser/session.py from the raw cdp_use.CDPClient to our
TimeoutWrappedCDPClient subclass. test_cdp_headers.py patches the
CDPClient symbol in session.py's namespace to assert headers/User-Agent
propagate — but since the code now instantiates TimeoutWrappedCDPClient,
the patch no longer intercepts the call and the mock.assert_called_once
check fails with 'Called 0 times'.

Point the patches at session.TimeoutWrappedCDPClient instead so the
assertions match what the code actually constructs. Header propagation
still works end-to-end because TimeoutWrappedCDPClient forwards
*args/**kwargs to super().__init__.
2026-04-20 17:45:35 -07:00
..
2025-10-25 09:09:54 -07:00
2025-10-25 09:09:54 -07:00
2025-10-26 17:05:00 -07:00