Fix tests on django 1.2