Fixes tests on Django 1.6.