fix tests for newer versions of django