Cleaned tests file to correct all pyflakes and pep8 errors

Still sad to lose space before paren