From b5ae07613b273ccf6b0f55e5219f7a8474d3059c Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Wed, 20 Dec 2023 11:00:10 -0700 Subject: [PATCH] Use url params for testing time based result filtering The ":past " query string filtering isn't used anymore since adding the option to filter by time in the result view. --- test/test_results.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/test_results.py b/test/test_results.py index 64caacd..ad0fd3e 100644 --- a/test/test_results.py +++ b/test/test_results.py @@ -96,13 +96,13 @@ def test_view_my_ip(client): def test_recent_results(client): times = { - 'past year': 365, - 'past month': 31, - 'past week': 7 + 'tbs=qdr:y': 365, + 'tbs=qdr:m': 31, + 'tbs=qdr:w': 7 } 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) current_date = datetime.now()