Skip to content

Commit 28cd970

Browse files
committed
test: rest mock
1 parent 2e534af commit 28cd970

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/unit/test_pageiterator.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@ def test_no_paging_required():
6565
obj = RestObj(items=items, count=len(items))
6666

6767
with mock.patch("sasctl.core.request") as req:
68+
# Mock appears to be *sometimes* shared with mock created in `paging` fixture
69+
# above. Depending on execution order, this can result in calls to the mock
70+
# made by other tests to be counted here. Explicitly reset to prevent this.
71+
req.reset_mock()
6872
pager = PageIterator(obj)
6973

7074
# Returned page of items should preserve item order

0 commit comments

Comments
 (0)