Cleaned tests file to correct all pyflakes and pep8 errors

Your changed version loses that, although perhaps that's just life.