Enable the query log for tests. DRY up code.