Skip to content

Commit

Permalink
add retained page size test
Browse files Browse the repository at this point in the history
  • Loading branch information
fauna-chase committed Jan 10, 2025
1 parent 62ca060 commit 2b2d12b
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/integration/test_feeds.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,19 @@ 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

0 comments on commit 2b2d12b

Please sign in to comment.