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")
main
Ben Busby 2020-04-26 18:11:02 -06:00
parent 36ce44ae6a
commit dd077954bf
1 changed files with 1 additions and 1 deletions

View File

@ -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: