Fix tests
flake8, pep8 and coverage