Cleaned tests file to correct all pyflakes and pep8 errors

I feel like the indenting was supposed to mean something here, although I guess I don't really grok what it means.