Cleaned tests file to correct all pyflakes and pep8 errors

We seem to be a bit inconsistent with whether the opening and closing triple-quotes are on their own line or inline.