Fixing flake8 in tests