add test scenario for query.py