tests: missed one change from 8b8338552c4b18f43627dddc634c7e1f84d8515e

Add missing modification to tests from
8b8338552c4b18f43627dddc634c7e1f84d8515e for making query test not
sensitive to order of results.