Perhaps above this line, do `assert res['hits']`. 
Suppose `res['hits']` is an empty list, then nothing would happen in the for loop and no tests be verified there.