Fixed querygen unittest, all working now :)