Fixed test failures on Django 1.7+