Fix tests on Django 1.7+