Cleaned tests file to correct all pyflakes and pep8 errors

Pheeeeewww that is one long function name!