Skip to content

Commit

Permalink
Fix the StopIteration errors from aresponses in some tests
Browse files Browse the repository at this point in the history
Signed-off-by: Sergey Vasilyev <[email protected]>
  • Loading branch information
nolar committed Nov 18, 2024
1 parent 321a6de commit 017f860
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/peering/test_keepalive.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,6 @@ async def test_background_task_runs(mocker, settings, namespaced_peering_resourc
assert sleep_mock.call_args_list[2][0][0] == 33 - 9

assert touch_mock.call_count == 4 # 3 updates + 1 clean-up

# An hack for `aresponses` that calls `sleep(0)` on finalization and fails on StopIteration.
mocker.stopall()

0 comments on commit 017f860

Please sign in to comment.