From 3fb22d67b6c19c683d0b50e16abd4b720aaa13ae Mon Sep 17 00:00:00 2001 From: fauna-chase Date: Fri, 10 Jan 2025 10:40:18 -0600 Subject: [PATCH] add retained page size test --- tests/integration/test_feeds.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/integration/test_feeds.py b/tests/integration/test_feeds.py index f8cb4f2c..7a368f96 100644 --- a/tests/integration/test_feeds.py +++ b/tests/integration/test_feeds.py @@ -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