Use url params for testing time based result filtering
The ":past <duration>" query string filtering isn't used anymore since adding the option to filter by time in the result view.main
parent
166b28040a
commit
b5ae07613b
|
@ -96,13 +96,13 @@ def test_view_my_ip(client):
|
||||||
|
|
||||||
def test_recent_results(client):
|
def test_recent_results(client):
|
||||||
times = {
|
times = {
|
||||||
'past year': 365,
|
'tbs=qdr:y': 365,
|
||||||
'past month': 31,
|
'tbs=qdr:m': 31,
|
||||||
'past week': 7
|
'tbs=qdr:w': 7
|
||||||
}
|
}
|
||||||
|
|
||||||
for time, num_days in times.items():
|
for time, num_days in times.items():
|
||||||
rv = client.get(f'/{Endpoint.search}?q=test :' + time)
|
rv = client.get(f'/{Endpoint.search}?q=test&' + time)
|
||||||
result_divs = get_search_results(rv.data)
|
result_divs = get_search_results(rv.data)
|
||||||
|
|
||||||
current_date = datetime.now()
|
current_date = datetime.now()
|
||||||
|
|
Loading…
Reference in New Issue