File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -301,9 +301,10 @@ async def test_mark_dead_error_doesnt_raise():
301301 randomize_nodes_in_pool = False ,
302302 )
303303 bad_node = t .node_pool ._all_nodes [NodeConfig ("http" , "localhost" , 80 )]
304- with mock .patch .object (t .node_pool , "mark_dead" ) as mark_dead , mock .patch .object (
305- t , "sniff"
306- ) as sniff :
304+ with (
305+ mock .patch .object (t .node_pool , "mark_dead" ) as mark_dead ,
306+ mock .patch .object (t , "sniff" ) as sniff ,
307+ ):
307308 sniff .side_effect = TransportError ("sniffing error!" )
308309 await t .perform_request ("GET" , "/" )
309310 mark_dead .assert_called_with (bad_node )
Original file line number Diff line number Diff line change @@ -309,9 +309,10 @@ def test_sniff_on_node_failure_error_doesnt_raise():
309309 randomize_nodes_in_pool = False ,
310310 )
311311 bad_node = t .node_pool ._all_nodes [NodeConfig ("http" , "localhost" , 80 )]
312- with mock .patch .object (t , "sniff" ) as sniff , mock .patch .object (
313- t .node_pool , "mark_dead"
314- ) as mark_dead :
312+ with (
313+ mock .patch .object (t , "sniff" ) as sniff ,
314+ mock .patch .object (t .node_pool , "mark_dead" ) as mark_dead ,
315+ ):
315316 sniff .side_effect = TransportError ("sniffing error!" )
316317 t .perform_request ("GET" , "/" )
317318 mark_dead .assert_called_with (bad_node )
You can’t perform that action at this time.
0 commit comments