@@ -51,9 +51,10 @@ async def test_ws_connect_read_timeout_is_reset_to_inf(
5151 hdrs .SEC_WEBSOCKET_PROTOCOL : "chat" ,
5252 }
5353 resp .connection .protocol .read_timeout = 0.5
54- with mock .patch ("aiohttp.client.os" ) as m_os , mock .patch (
55- "aiohttp.client.ClientSession.request"
56- ) as m_req :
54+ with (
55+ mock .patch ("aiohttp.client.os" ) as m_os ,
56+ mock .patch ("aiohttp.client.ClientSession.request" ) as m_req ,
57+ ):
5758 m_os .urandom .return_value = key_data
5859 m_req .return_value = loop .create_future ()
5960 m_req .return_value .set_result (resp )
@@ -80,9 +81,10 @@ async def test_ws_connect_read_timeout_stays_inf(
8081 hdrs .SEC_WEBSOCKET_PROTOCOL : "chat" ,
8182 }
8283 resp .connection .protocol .read_timeout = None
83- with mock .patch ("aiohttp.client.os" ) as m_os , mock .patch (
84- "aiohttp.client.ClientSession.request"
85- ) as m_req :
84+ with (
85+ mock .patch ("aiohttp.client.os" ) as m_os ,
86+ mock .patch ("aiohttp.client.ClientSession.request" ) as m_req ,
87+ ):
8688 m_os .urandom .return_value = key_data
8789 m_req .return_value = loop .create_future ()
8890 m_req .return_value .set_result (resp )
@@ -111,9 +113,10 @@ async def test_ws_connect_read_timeout_reset_to_max(
111113 hdrs .SEC_WEBSOCKET_PROTOCOL : "chat" ,
112114 }
113115 resp .connection .protocol .read_timeout = 0.5
114- with mock .patch ("aiohttp.client.os" ) as m_os , mock .patch (
115- "aiohttp.client.ClientSession.request"
116- ) as m_req :
116+ with (
117+ mock .patch ("aiohttp.client.os" ) as m_os ,
118+ mock .patch ("aiohttp.client.ClientSession.request" ) as m_req ,
119+ ):
117120 m_os .urandom .return_value = key_data
118121 m_req .return_value = loop .create_future ()
119122 m_req .return_value .set_result (resp )
@@ -416,9 +419,11 @@ async def test_close_connection_lost(
416419 hdrs .SEC_WEBSOCKET_ACCEPT : ws_key ,
417420 }
418421 mresp .connection .protocol .read_timeout = None
419- with mock .patch ("aiohttp.client.WebSocketWriter" ), mock .patch (
420- "aiohttp.client.os"
421- ) as m_os , mock .patch ("aiohttp.client.ClientSession.request" ) as m_req :
422+ with (
423+ mock .patch ("aiohttp.client.WebSocketWriter" ),
424+ mock .patch ("aiohttp.client.os" ) as m_os ,
425+ mock .patch ("aiohttp.client.ClientSession.request" ) as m_req ,
426+ ):
422427 m_os .urandom .return_value = key_data
423428 m_req .return_value = loop .create_future ()
424429 m_req .return_value .set_result (mresp )
0 commit comments