Fix tests for django 1.3.7 and 1.4.10