Models.py syntax error fix and test corrections