Cleaned tests file to correct all pyflakes and pep8 errors

Hrm, this is a grammatical mess. Maybe "Expected JSON to report that ..." ?