Fix tests under Django 1.4