Skip to content

Commit 060baf1

Browse files
committed
Test the resource.iterate method with a page limit.
1 parent 086e30a commit 060baf1

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313
- Move README sections into /docs with farmOS.org config.yml.
1414
- Add github workflow to build netlify docs.
1515
- Run tests on pull requests to 1.x.
16+
- Test `resource.iterate` method with a page limit.
1617

1718
### Fixed
1819
- Do not include the endpoint property in the serialized subrequest.

tests/functional/test_resource.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,6 @@ def test_user_update_self(test_farm):
3737

3838
@farmOS_testing_server
3939
def test_user_iterate(test_farm):
40-
all_users = list(test_farm.resource.iterate("user"))
40+
all_users = list(test_farm.resource.iterate("user", params={"page[limit]": 1}))
4141

42-
assert len(all_users) > 0
42+
assert len(all_users) > 1

0 commit comments

Comments
 (0)