Fixed line-endings on tests.py
Fixed Django 1.5 compatibility