From dd077954bfbb5dd102bfdfd5cdd4a04cec96e1bb Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Sun, 26 Apr 2020 18:11:02 -0600 Subject: [PATCH] Fixed search results test For datetime spans in time-filtered search results, anything less than 7 characters or more than 15 can be guaranteed to not be properly formatted dates (either "mm dd yyyy" or "xx days/months/weeks ago") --- test/test_results.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_results.py b/test/test_results.py index cb70957..4d97d0f 100644 --- a/test/test_results.py +++ b/test/test_results.py @@ -45,7 +45,7 @@ def test_recent_results(client): current_date = datetime.now() for div in result_divs: date_span = div.find('span').decode_contents() - if not date_span or len(date_span) > 15: + if not date_span or len(date_span) > 15 or len(date_span) < 7: continue try: