Small update to results time period test
Updated to ensure a child span element is available before running a test to verify the correct time range for the result. Need to come up with a better way of ensuring uniform results across multiple tests, since otherwise periodic changes in the returned results can cause tests to fail.main
parent
4e970a4796
commit
6ef7ab663a
|
@ -55,7 +55,7 @@ def test_recent_results(client):
|
|||
result_divs = get_search_results(rv.data)
|
||||
|
||||
current_date = datetime.now()
|
||||
for div in result_divs:
|
||||
for div in [_ for _ in result_divs if _.find('span')]:
|
||||
date_span = div.find('span').decode_contents()
|
||||
if not date_span or len(date_span) > 15 or len(date_span) < 7:
|
||||
continue
|
||||
|
|
Loading…
Reference in New Issue