?_size=max option, closes #249

This commit is contained in:
Simon Willison 2018-05-04 15:03:40 -03:00
commit d4da4c92c8
No known key found for this signature in database
GPG key ID: 17E2DEA2588B7F52
3 changed files with 6 additions and 2 deletions

View file

@ -451,6 +451,7 @@ def test_table_with_reserved_word_name(app_client):
('/test_tables/paginated_view.json', 201, 5),
('/test_tables/no_primary_key.json?_size=25', 201, 9),
('/test_tables/paginated_view.json?_size=25', 201, 9),
('/test_tables/paginated_view.json?_size=max', 201, 3),
('/test_tables/123_starts_with_digits.json', 0, 1),
])
def test_paginate_tables_and_views(app_client_longer_time_limit, path, expected_rows, expected_pages):
@ -458,6 +459,7 @@ def test_paginate_tables_and_views(app_client_longer_time_limit, path, expected_
count = 0
while path:
response = app_client_longer_time_limit.get(path, gather_request=False)
assert 200 == response.status
count += 1
fetched.extend(response.json['rows'])
path = response.json['next_url']