Skip to content

Commit 2dcf5b2

Browse files
committed
test: debug mock calls
1 parent 9248073 commit 2dcf5b2

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

tests/unit/test_pageiterator_no_paging.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@ def test_no_paging_required():
1111

1212
with mock.patch("sasctl.core.request") as req:
1313
req.reset_mock(side_effect=True)
14+
try:
15+
req.assert_not_called()
16+
except AssertionError:
17+
raise AssertionError(
18+
f"Previous calls: method_calls={req.mock_calls} call_args={req.call_args_list}"
19+
)
20+
1421
pager = PageIterator(obj)
1522

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

0 commit comments

Comments
 (0)