Modify test_time2.py to handle query string exception