TST/BUG: add engine to check_query