Skip to content

Commit

Permalink
test: debug mock calls
Browse files Browse the repository at this point in the history
  • Loading branch information
jlwalke2 committed Aug 29, 2024
1 parent 9248073 commit 2dcf5b2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tests/unit/test_pageiterator_no_paging.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ def test_no_paging_required():

with mock.patch("sasctl.core.request") as req:
req.reset_mock(side_effect=True)
try:
req.assert_not_called()
except AssertionError:
raise AssertionError(
f"Previous calls: method_calls={req.mock_calls} call_args={req.call_args_list}"
)

pager = PageIterator(obj)

# Returned page of items should preserve item order
Expand All @@ -21,7 +28,7 @@ def test_no_paging_required():
# No req should have been made to retrieve additional data.
try:
req.assert_not_called()
except AssertionError as e:
except AssertionError:
raise AssertionError(
f"method_calls={req.mock_calls} call_args={req.call_args_list}"
)

0 comments on commit 2dcf5b2

Please sign in to comment.