Fixed test failures on django 1.4