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
parent
36ce44ae6a
commit
dd077954bf
|
@ -45,7 +45,7 @@ def test_recent_results(client):
|
||||||
current_date = datetime.now()
|
current_date = datetime.now()
|
||||||
for div in result_divs:
|
for div in result_divs:
|
||||||
date_span = div.find('span').decode_contents()
|
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
|
continue
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue