File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -256,7 +256,11 @@ async def test_wrap_method_with_overriding_timeout_as_a_number():
256256 result = await wrapped_method (timeout = 22 )
257257
258258 assert result == 42
259- method .assert_called_once_with (timeout = 22 , metadata = mock .ANY )
259+
260+ actual_timeout = method .call_args [1 ]["timeout" ]
261+ metadata = method .call_args [1 ]["metadata" ]
262+ assert metadata == mock .ANY
263+ assert actual_timeout == pytest .approx (22 , abs = 0.01 )
260264
261265
262266@pytest .mark .asyncio
Original file line number Diff line number Diff line change @@ -201,7 +201,11 @@ def test_wrap_method_with_overriding_timeout_as_a_number():
201201 result = wrapped_method (timeout = 22 )
202202
203203 assert result == 42
204- method .assert_called_once_with (timeout = 22 , metadata = mock .ANY )
204+
205+ actual_timeout = method .call_args [1 ]["timeout" ]
206+ metadata = method .call_args [1 ]["metadata" ]
207+ assert metadata == mock .ANY
208+ assert actual_timeout == pytest .approx (22 , abs = 0.01 )
205209
206210
207211def test_wrap_method_with_call ():
You can’t perform that action at this time.
0 commit comments