Skip to content

Commit

Permalink
test: rest mock
Browse files Browse the repository at this point in the history
  • Loading branch information
jlwalke2 committed Aug 29, 2024
1 parent 2e534af commit 28cd970
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/unit/test_pageiterator.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ def test_no_paging_required():
obj = RestObj(items=items, count=len(items))

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

# Returned page of items should preserve item order
Expand Down

0 comments on commit 28cd970

Please sign in to comment.