Commit e6e59345 authored by Lauri Himanen's avatar Lauri Himanen
Browse files

Testing if the scroll parameter is invalid in tests.

parent a564c77b
Pipeline #70732 failed with stages
in 15 minutes and 44 seconds
......@@ -16,7 +16,7 @@ future
enum34
requests
celery[redis]
elasticsearch-dsl==6.4.0
elasticsearch-dsl>=6.0.0,<7.0.0
mongoengine==0.18.2
Werkzeug==0.16.1
flask
......
......@@ -965,9 +965,9 @@ class TestRepo():
@pytest.mark.parametrize('n_results, size', [(2, None), (2, 5), (1, 1)])
def test_search_scroll(self, api, example_elastic_calcs, no_warn, n_results, size):
if size is not None:
rv = api.get('/repo/?scroll=1,&per_page=%d' % size)
rv = api.get('/repo/?scroll=1m,&per_page=%d' % size)
else:
rv = api.get('/repo/?scroll=1')
rv = api.get('/repo/?scroll=1m')
assert rv.status_code == 200
data = json.loads(rv.data)
......@@ -980,7 +980,7 @@ class TestRepo():
has_another_page = False
while scroll_id is not None:
rv = api.get('/repo/?scroll=1&scroll_id=%s' % scroll_id)
rv = api.get('/repo/?scroll=1m&scroll_id=%s' % scroll_id)
data = json.loads(rv.data)
scroll_id = data.get('scroll', {}).get('scroll_id', None)
has_another_page |= len(data.get('results')) > 0
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment