Fix query counting tests for django 1.6.