Added unit-test compatibility for Django v1.7.