File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1246,18 +1246,14 @@ async def test_https_connect_skip_payload_on_200( # type: ignore[misc]
12461246 proxy = URL ("http://proxy.example.com" ),
12471247 loop = event_loop ,
12481248 )
1249- # Capture the set_response_params call on the tunnel
1250- # protocol to verify skip_payload=True is passed.
1251- with mock .patch (
1252- "aiohttp.connector.ResponseHandler.set_response_params" ,
1253- autospec = True ,
1254- ) as set_params_mock :
1255- await connector ._create_connection (
1256- req , [], aiohttp .ClientTimeout ()
1257- )
1249+ await connector ._create_connection (
1250+ req , [], aiohttp .ClientTimeout ()
1251+ )
12581252
1259- set_params_mock .assert_called_once_with (
1260- mock .ANY , # self
1253+ # proto is the mock protocol returned by create_connection.
1254+ # The connector calls protocol.set_response_params(...) on it
1255+ # directly, so we assert on proto's auto-mock attribute.
1256+ proto .set_response_params .assert_called_once_with (
12611257 read_until_eof = True ,
12621258 timeout_ceil_threshold = mock .ANY ,
12631259 skip_payload = True ,
You can’t perform that action at this time.
0 commit comments