Fixed test compatibility for older django