tests: flake8 fixes