Cleaned tests file to correct all pyflakes and pep8 errors

I think the new phrasing is less clear, but if you want it that way, OK.