fix failing unit tests on older versions of django