Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

add retained page size test #211

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions tests/integration/test_feeds.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,20 @@ def test_feed_start_ts(client, a_collection):
assert nums == list(range(1, 64))


def test_page_size_is_retained_across_requests(client, a_collection):
source = client.query(
fql("${col}.all().map(.n).toStream()", col=a_collection)).data
_create_docs(client, a_collection, 0, 15)

feed = client.feed(source, FeedOptions(page_size=5))
page_count = 0
for page in feed:
page_count = page_count + 1
assert len(page) == 5

assert page_count == 3


def test_feed_cursor(client, a_collection):
source = client.query(
fql("${col}.all().map(.n).toStream()", col=a_collection)).data
Expand Down
Loading