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
Ben Busby 2023-12-20 11:00:10 -07:00
parent 166b28040a
commit b5ae07613b
No known key found for this signature in database
GPG Key ID: B9B7231E01D924A1
1 changed files with 4 additions and 4 deletions

View File

@ -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()