Cleaned tests file to correct all pyflakes and pep8 errors

Same as above -- PEP8 and I would prefer parens, not backslashes, where possible.