tests: pyflakes / pep8 fixes